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

--- Comment #13 from Zhendong Su <su at cs dot ucdavis.edu> ---
(In reply to Jakub Jelinek from comment #11)
> The #c0 issue is different (with the reorder_operands call commented out),
...
> That said, I'd like to fix #c8 independently.

Jakub, indeed, #c8 was reduced from another test. I thought the two were the
same as they have the same exact stack trace. 

FYI, below is a reduced test from the same original test as for #c0. It fails
with r219963. 

$ 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 20150121 (experimental) [trunk revision 219963] (GCC) 

$ 
$ gcc-trunk -O3 -g -c small2.c
$ 
$ time gcc-trunk -O3 -g -c small2.c
gcc-trunk: internal compiler error: Segmentation fault (program cc1)
0x40c27f execute
    ../../gcc-trunk/gcc/gcc.c:2913
0x40c589 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:4846
0x40eb87 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6129
0x40eb87 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6043
0x40d587 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5500
0x40eb87 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6129
0x40eb87 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6043
0x40d587 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5500
0x40c913 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5615
0x40eb87 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6129
0x40eb87 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6043
0x40d587 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5500
0x40eb87 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6129
0x40eb87 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6043
0x40d587 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5500
0x40eb87 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6129
0x40eb87 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6043
0x40d587 do_spec_1
    ../../gcc-trunk/gcc/gcc.c:5500
0x40eb87 process_brace_body
    ../../gcc-trunk/gcc/gcc.c:6129
0x40eb87 handle_braces
    ../../gcc-trunk/gcc/gcc.c:6043
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
8.05user 0.59system 0:12.84elapsed 67%CPU (0avgtext+0avgdata
3121136maxresident)k
0inputs+0outputs (0major+195936minor)pagefaults 0swaps
$ 


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


extern void fn1 (int p1, int p2);

short d;

void fn2 (int p1, unsigned char p2)
{
  unsigned char k, *l = &p2;
  short m;
  for (m = 27; m < 37; m++)
    d *= *l %= *l;
  fn1 (p1 %= p2, p1 = k);
}

Reply via email to