public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/61047] New: wrong code at -O1 on x86_64-linux
@ 2014-05-03 17:39 su at cs dot ucdavis.edu
  2014-05-03 21:11 ` [Bug rtl-optimization/61047] " jakub at gcc dot gnu.org
                   ` (24 more replies)
  0 siblings, 25 replies; 26+ messages in thread
From: su at cs dot ucdavis.edu @ 2014-05-03 17:39 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 61047
           Summary: wrong code at -O1 on x86_64-linux
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The current gcc trunk and 4.9.0 mis-compile the following code on x86_64-linux
at -O1 in both 32-bit and 64-bit modes. 

This is a regression from 4.8.x and seems related to
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60452. 

$ 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.10.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc-trunk/configure --prefix=/usr/local/gcc-trunk
--enable-languages=c,c++ --disable-werror --enable-multilib
Thread model: posix
gcc version 4.10.0 20140503 (experimental) [trunk revision 210026] (GCC) 
$ 
$ gcc-trunk -O0 small.c; a.out
$ gcc-trunk -Os small.c; a.out
$ gcc-4.8.2 -O1 small.c; a.out
$ 
$ gcc-trunk -O1 small.c
$ a.out
Segmentation fault (core dumped)
$ gcc-4.9.0 -O1 small.c
$ a.out
Segmentation fault (core dumped)
$ 

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

int a, c, d;
short b;

int
main ()
{
  int e[1];
  for (; b < 2; b++)
    {
      a = 0;
      if (b == 2837)
        a = e[b];
      if (!(d || b))
        for (; c;)
          ;
    }
  return 0;
}


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

end of thread, other threads:[~2015-07-01 16:11 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-03 17:39 [Bug rtl-optimization/61047] New: wrong code at -O1 on x86_64-linux su at cs dot ucdavis.edu
2014-05-03 21:11 ` [Bug rtl-optimization/61047] " jakub at gcc dot gnu.org
2014-05-05  9:12 ` [Bug rtl-optimization/61047] [4.9/4.10 Regression] " rguenth at gcc dot gnu.org
2014-05-09 11:01 ` ebotcazou at gcc dot gnu.org
2014-06-08 14:46 ` bernd.edlinger at hotmail dot de
2014-06-08 15:03 ` bernd.edlinger at hotmail dot de
2014-06-08 15:17 ` bernd.edlinger at hotmail dot de
2014-06-11 20:02 ` bernd.edlinger at hotmail dot de
2014-07-16 13:29 ` jakub at gcc dot gnu.org
2014-10-30 10:40 ` [Bug rtl-optimization/61047] [4.9/5 " jakub at gcc dot gnu.org
2015-01-12 16:13 ` ebotcazou at gcc dot gnu.org
2015-01-13  6:54 ` bernd.edlinger at hotmail dot de
2015-01-13  8:24 ` ebotcazou at gcc dot gnu.org
2015-01-13  8:37 ` zsojka at seznam dot cz
2015-01-13  8:43 ` bernd.edlinger at hotmail dot de
2015-01-13  9:25 ` ebotcazou at gcc dot gnu.org
2015-02-12 12:59 ` jakub at gcc dot gnu.org
2015-03-11  0:31 ` jakub at gcc dot gnu.org
2015-06-10 15:46 ` [Bug rtl-optimization/61047] [4.9/5/6 " bernhard.kaindl at thalesgroup dot com
2015-06-10 16:05 ` ebotcazou at gcc dot gnu.org
2015-06-10 16:12 ` jakub at gcc dot gnu.org
2015-06-10 16:16 ` bernd.edlinger at hotmail dot de
2015-06-10 16:23 ` ebotcazou at gcc dot gnu.org
2015-06-26 20:19 ` jakub at gcc dot gnu.org
2015-06-26 20:38 ` jakub at gcc dot gnu.org
2015-07-01 16:11 ` edlinger 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).