This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: optimization/10171: [3.2/3.3/3.4 regression] wrong code for inlined function
- From: bangerth at dealii dot org
- To: agesen at vmware dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mchen at vmware dot com, mendel at vmware dot com, nobody at gcc dot gnu dot org
- Date: 20 Mar 2003 19:09:33 -0000
- Subject: Re: optimization/10171: [3.2/3.3/3.4 regression] wrong code for inlined function
- Reply-to: bangerth at dealii dot org, agesen at vmware dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, mchen at vmware dot com, mendel at vmware dot com, nobody at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
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