public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/58653] New: wrong code (segfaults) at -O3 on x86_64-linux-gnu in 64-bit mode (affecting gcc 4.6 to trunk)
@ 2013-10-06 23:35 su at cs dot ucdavis.edu
  2013-10-07  8:36 ` [Bug tree-optimization/58653] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: su at cs dot ucdavis.edu @ 2013-10-06 23:35 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 58653
           Summary: wrong code (segfaults) at -O3 on x86_64-linux-gnu in
                    64-bit mode (affecting gcc 4.6 to trunk)
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The current gcc trunk (as well as 4.6, 4.7, and 4.8) mis-compiles the following
code on x86_64-linux at -O3 in 64-bit mode, resulting in a segfault. 


$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/usr/local/gcc-trunk/libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure
--enable-languages=c,c++,objc,obj-c++,fortran,lto --disable-werror
--enable-checking=release --with-gmp=/usr/local/gcc-trunk
--with-mpfr=/usr/local/gcc-trunk --with-mpc=/usr/local/gcc-trunk
--with-cloog=/usr/local/gcc-trunk --prefix=/usr/local/gcc-trunk
Thread model: posix
gcc version 4.9.0 20131006 (experimental) [trunk revision 203227] (GCC) 
$ 
$ gcc-trunk -m64 -O2 small.c; a.out
$ gcc-trunk -m32 -O3 small.c; a.out
$
$ gcc-trunk -m64 -O3 small.c; a.out
Segmentation fault (core dumped)
$ gcc-4.8 -m64 -O3 small.c; a.out
Segmentation fault (core dumped)
$ gcc-4.7 -m64 -O3 small.c; a.out
Segmentation fault (core dumped)
$ gcc-4.6 -m64 -O3 small.c; a.out
Segmentation fault (core dumped)
$  

---------------------------------

int a, c, e[5][2]; 
unsigned int d;

int
main ()
{
  for (d = 0; d < 2; d++)
    if (a ? 0 : e[c + 3][d] & e[c + 4][d])
      break;
  return 0;
}


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

end of thread, other threads:[~2014-06-12 13:30 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-06 23:35 [Bug tree-optimization/58653] New: wrong code (segfaults) at -O3 on x86_64-linux-gnu in 64-bit mode (affecting gcc 4.6 to trunk) su at cs dot ucdavis.edu
2013-10-07  8:36 ` [Bug tree-optimization/58653] [4.7/4.8/4.9 Regression] " mpolacek at gcc dot gnu.org
2013-10-10 11:57 ` rguenth at gcc dot gnu.org
2013-10-11 14:55 ` mikpelinux at gmail dot com
2013-11-05 14:53 ` rguenth at gcc dot gnu.org
2013-11-05 15:25 ` rguenth at gcc dot gnu.org
2013-11-06 12:58 ` rguenth at gcc dot gnu.org
2013-11-06 14:43 ` rguenth at gcc dot gnu.org
2013-11-06 15:02 ` rguenth at gcc dot gnu.org
2013-11-06 15:03 ` [Bug tree-optimization/58653] [4.7/4.8 " rguenth at gcc dot gnu.org
2013-11-08 12:49 ` rguenth at gcc dot gnu.org
2013-11-18 15:13 ` rguenth at gcc dot gnu.org
2013-11-18 15:15 ` [Bug tree-optimization/58653] [4.7 " rguenth at gcc dot gnu.org
2014-06-12 13:30 ` rguenth 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).