This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/49140] [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]