Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
DescriptionCaolan McNamara
2019-02-25 21:37:51 UTC
Created attachment 1538599[details]
preprocessed code
Description of problem:
code of...
nColCount = 1;
...
nColCount = std::max<sal_Int32>(aIter.toInt32(), 1);
nColCount = std::min<sal_Int32>(nColCount, MAXCOLCOUNT);
results as if std::max line was elided, nColCount ends as 1 regardless of result of aIter.toInt32()
Version-Release number of selected component (if applicable):
gcc-9.0.1-0.4.fc30
How reproducible:
100%
Steps to Reproduce:
1. g++ -std=gnu++2a -fPIC -c -O2 ~/xmlcoli.ii
Actual results:
linking that into LibreOffice gives failure as described in bug #1678319
Additional info:
2. g++ -std=gnu++2a -fPIC -c -O1 ~/xmlcoli.ii
is ok, and rewriting as
nColCount = aIter.toInt32();
if (nColCount < 1)
nColCount = 1;
else if (nColCount > MAXCOLCOUNT)
nColCount = MAXCOLCOUNT;
works fine