public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49140] New: [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline
@ 2011-05-24 13:38 doko at ubuntu dot com
  2011-05-24 15:29 ` [Bug tree-optimization/49140] " rguenth at gcc dot gnu.org
                   ` (25 more replies)
  0 siblings, 26 replies; 27+ messages in thread
From: doko at ubuntu dot com @ 2011-05-24 13:38 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49140

           Summary: [4.6 regression] wrong code with -O2 and -O3, not with
                    -O3 -no-inline
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: doko@ubuntu.com


Created attachment 24342
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24342
preprocessed source

[forwarded from http://bugs.debian.org/627084]

seen with r174102 from the 4.6 branch, works with r173903 from the trunk


Step to reproduce:

wget 'http://pari.math.u-bordeaux.fr/~bill/pari-2.4.3.12000.tar.gz'
tar xf pari-2.4.3.12000.tar.gz
cd pari-2.4.3.alpha
./Configure
make gp
make bench

Result: all test suite fail.

Cause: 

The function pari_init_parser() in the file src/language/parsec.h is
miscompiled.
(This file is included by src/language/parse.y).

If you replace the line 43: s_node.n=OPnboperator; by parsestate_reset(); 
(which does the same thing), then all test pass.

It seems that the issue is that the function stack_alloc() is not inlined
correctly,
which cause pari_tree to be NULL (or maybe the call to pari_inline inside
stack_alloc()
is not inlined correctly.

The command line used is
gcc-4.6  -c -O3 -Wall -fno-strict-aliasing -fomit-frame-pointer    -I.
-I../src/headers -fPIC -o
parse.o ../src/language/parse.c

It also happens with -O2, but not with -O3 -fno-inline.

It works fine with gcc 4.3, 4.4 and 4.5.


^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2013-04-12 16:31 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-24 13:38 [Bug tree-optimization/49140] New: [4.6 regression] wrong code with -O2 and -O3, not with -O3 -no-inline doko at ubuntu dot com
2011-05-24 15:29 ` [Bug tree-optimization/49140] " rguenth at gcc dot gnu.org
2011-06-12 12:44 ` rguenth at gcc dot gnu.org
2011-06-12 14:29 ` hjl.tools at gmail dot com
2011-06-27 15:57 ` jakub at gcc dot gnu.org
2011-07-14 22:10 ` grokbrsm at free dot fr
2011-07-18  8:02 ` rguenth at gcc dot gnu.org
2011-07-18 10:20 ` doko at ubuntu dot com
2011-07-18 19:55 ` grokbrsm at free dot fr
2011-07-18 20:00 ` grokbrsm at free dot fr
2011-07-19  8:06 ` rguenth at gcc dot gnu.org
2011-07-19 16:13 ` grokbrsm at free dot fr
2011-07-19 16:15 ` grokbrsm at free dot fr
2011-07-20  6:08 ` grokbrsm at free dot fr
2011-07-20  7:11 ` grokbrsm at free dot fr
2011-07-20  8:45 ` rguenther at suse dot de
2011-07-20  9:24 ` rguenth at gcc dot gnu.org
2011-07-20 10:10 ` grokbrsm at free dot fr
2011-07-20 17:29 ` jakub at gcc dot gnu.org
2011-07-20 17:40 ` jakub at gcc dot gnu.org
2011-07-20 17:43 ` jakub at gcc dot gnu.org
2011-07-20 21:24 ` grokbrsm at free dot fr
2011-08-01 14:40 ` rguenth at gcc dot gnu.org
2011-10-16 14:40 ` mans at mansr dot com
2011-10-26 17:24 ` jakub at gcc dot gnu.org
2012-03-01 15:15 ` jakub at gcc dot gnu.org
2013-04-12 16:31 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).