public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/64511] New: ICE at -O3 with -g enabled on x86_64-linux-gnu
@ 2015-01-06 19:01 su at cs dot ucdavis.edu
  2015-01-06 21:03 ` [Bug c/64511] [5 Regression] " hjl.tools at gmail dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: su at cs dot ucdavis.edu @ 2015-01-06 19:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64511

            Bug ID: 64511
           Summary: ICE at -O3 with -g enabled on x86_64-linux-gnu
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: su at cs dot ucdavis.edu

The following code causes an ICE (after a very very long pause) when compiled
with the current gcc trunk at -O3 with -g enabled on x86_64-linux-gnu in 64-bit
mode (but not in 32-bit mode). 

It is a regression from 4.9.x.

$ 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/5.0.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 5.0.0 20150106 (experimental) [trunk revision 219217] (GCC) 

$ 
$ gcc-trunk -O3 -c small.c
$ gcc-4.9 -O3 -g -c small.c
$ 
$ time gcc-trunk -O3 -g -c small.c
gcc-trunk: internal compiler error: Segmentation fault (program cc1)
0x40c1de execute
    ../../gcc-trunk/gcc/gcc.c:2912
0x40c4e9 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:4845
0x40eaf7 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6128
0x40eaf7 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6042
0x40d4e7 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5499
0x40eaf7 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6128
0x40eaf7 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6042
0x40d4e7 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5499
0x40c873 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5614
0x40eaf7 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6128
0x40eaf7 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6042
0x40d4e7 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5499
0x40eaf7 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6128
0x40eaf7 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6042
0x40d4e7 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5499
0x40eaf7 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6128
0x40eaf7 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6042
0x40d4e7 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5499
0x40eaf7 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6128
0x40eaf7 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6042
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
Command exited with non-zero status 4
50.56user 1.04system 2:06.99elapsed 40%CPU (0avgtext+0avgdata
5923360maxresident)k
56inputs+0outputs (4major+371046minor)pagefaults 0swaps
$ 


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


char a;
unsigned short b;
int c;
unsigned long d;

void fn1 ()
{
  for (;;)
    ;
}

void fn2 (unsigned char p1)
{
  unsigned char *e = &p1;
  c = 27;
  for (; c < 37; c++)
    b *= (a %= ((*e %= *e) ^ 0));
  p1 /= d = a;
  fn1 (p1);
}


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

end of thread, other threads:[~2015-02-04 14:29 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 19:01 [Bug c/64511] New: ICE at -O3 with -g enabled on x86_64-linux-gnu su at cs dot ucdavis.edu
2015-01-06 21:03 ` [Bug c/64511] [5 Regression] " hjl.tools at gmail dot com
2015-01-06 22:07 ` [Bug debug/64511] " glisse at gcc dot gnu.org
2015-01-08  9:06 ` rguenth at gcc dot gnu.org
2015-01-12 14:51 ` rguenth at gcc dot gnu.org
2015-01-13 12:40 ` rguenth at gcc dot gnu.org
2015-01-13 15:31 ` jakub at gcc dot gnu.org
2015-01-20 17:42 ` jakub at gcc dot gnu.org
2015-01-21  6:38 ` su at cs dot ucdavis.edu
2015-01-21  9:02 ` rguenther at suse dot de
2015-01-21 10:04 ` jakub at gcc dot gnu.org
2015-01-21 10:30 ` jakub at gcc dot gnu.org
2015-01-21 22:00 ` jakub at gcc dot gnu.org
2015-01-22  7:44 ` su at cs dot ucdavis.edu
2015-01-22  7:48 ` jakub at gcc dot gnu.org
2015-01-22  7:51 ` su at cs dot ucdavis.edu
2015-01-22 14:06 ` jakub at gcc dot gnu.org
2015-02-01 17:32 ` jakub at gcc dot gnu.org
2015-02-01 22:01 ` jakub at gcc dot gnu.org
2015-02-03 20:41 ` aoliva at gcc dot gnu.org
2015-02-04 14:29 ` 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).