optimization/10171: [3.2/3.3/3.4 regression] wrong code for inlined function
bangerth@dealii.org
bangerth@dealii.org
Thu Mar 20 20:06:00 GMT 2003
Old Synopsis: contant inline function result evaluated wrong
New Synopsis: [3.2/3.3/3.4 regression] wrong code for inlined function
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Thu Mar 20 19:09:33 2003
State-Changed-Why:
Confirmed. Here's the same program, slightly modified:
------------------------
inline int tag() { return 0; }
int main() {
int i;
for (i = 0; i < (tag() ? 2 : 1); i++)
printf("Hello1\n");
}
--------------------------
The loop should be executed at least once, but isn't when
compiled with -O2 on 3.2, 3.3 and mainline. It worked with
2.95, though, so this is a regression. A serious one, I'd
say.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10171
More information about the Gcc-bugs
mailing list