public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50588] New: gcc produce bad inlined code with -march=athlon -O2
@ 2011-10-02 11:40 newsgrp at duradsl dot dyndns.org
  2011-10-02 11:58 ` [Bug target/50588] " mikpe at it dot uu.se
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: newsgrp at duradsl dot dyndns.org @ 2011-10-02 11:40 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50588
           Summary: gcc produce bad inlined code with -march=athlon -O2
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: newsgrp@duradsl.dyndns.org


Created attachment 25394
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25394
Reduced example that trigger the bug

When the attached file (which is a reduced testcase from inetutils
traceroute.c) is compiled with -march=athlon -O2, the resulting binary
segfault:

gcc -march=athlon -O2 -o traceroute traceroute.c
./traceroute
Before
Segmentation fault

When inlining is disabled, no problem:
gcc -march=athlon -O2 -fno-inline -o traceroute traceroute.c
./traceroute
Before
After

The problem can be reproduced on athlon-xp and core2 machines with 32 bits
libs.

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.6.1/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.6.1/configure --prefix=/usr --libexecdir=/usr/lib
--enable-shared --enable-threads=posix --enable-__cxa_atexit
--enable-clocale=gnu --enable-languages=c,c++ --disable-multilib
--disable-bootstrap --with-system-zlib
Thread model: posix
gcc version 4.6.1 (GCC)


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

end of thread, other threads:[~2014-05-18 19:03 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-02 11:40 [Bug target/50588] New: gcc produce bad inlined code with -march=athlon -O2 newsgrp at duradsl dot dyndns.org
2011-10-02 11:58 ` [Bug target/50588] " mikpe at it dot uu.se
2011-10-02 11:59 ` newsgrp at duradsl dot dyndns.org
2011-10-02 13:01 ` mikpe at it dot uu.se
2011-10-02 18:56 ` mikpe at it dot uu.se
2011-10-02 20:36 ` pinskia at gcc dot gnu.org
2011-10-02 20:45 ` mikpe at it dot uu.se
2011-10-02 22:00 ` newsgrp at duradsl dot dyndns.org
2011-10-02 22:01 ` newsgrp at duradsl dot dyndns.org
2011-10-02 22:40 ` newsgrp at duradsl dot dyndns.org
2011-10-03  8:36 ` mikpe at it dot uu.se
2011-10-03 11:46 ` mikpe at it dot uu.se
2011-10-03 12:57 ` mikpe at it dot uu.se
2011-10-03 19:28 ` mikpe at it dot uu.se
2011-10-06 13:30 ` bernds at gcc dot gnu.org
2011-12-18 14:12 ` mikpe at it dot uu.se
2011-12-31 23:08 ` [Bug rtl-optimization/50588] " pinskia at gcc dot gnu.org
2012-01-01  9:25 ` [Bug rtl-optimization/50588] gcc produce incorrect " ebotcazou at gcc dot gnu.org
2014-05-18 19:03 ` mikpelinux at gmail dot com

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).