This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline
- From: "mans at mansr dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 16 Oct 2011 14:40:29 +0000
- Subject: [Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline
- Auto-submitted: auto-generated
- References: <bug-49140-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49140
--- Comment #23 from Mans Rullgard <mans at mansr dot com> 2011-10-16 14:40:29 UTC ---
Created attachment 25516
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25516
Small test case with invalid code exhibiting the problem
Here's a small test case with invalid code showing the problem with several gcc
versions going back at least to 4.5. Compiling with -fno-tree-pta makes it
behave as "expected".
I do not believe the compiler to be at fault here. PARI is clearly full of
undefined behaviours they really ought to fix rather than complain that doing
so would change the ABI and blame the compiler which is only doing a good job
following the spec.