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

            Bug ID: 66945
           Summary: ICE in generic_simplify (generic-match.c:24790)
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antoine.balestrat at gmail dot com
  Target Milestone: ---

Hello !

This very pathological testcase seems to trigger an ICE with a freshly built
gcc.

$ xgcc --version
gcc (GCC) 6.0.0 20150720 (experimental)

$ cat tested.c
unsigned b;
f()
{
    for(;;)
        if(!b?:(b=0));
        else if(b%0<b?:b)
            for(;;);
}

$ xgcc -w -O1 tested.c
~/experiments/gcc/dist/bin/gcc -w -O1 tested.c
tested.c: In function ‘f’:
tested.c:2:1: internal compiler error: Segmentation fault
 f()
 ^
0xb7bd2f crash_signal
        ../../srcdir/gcc/toplev.c:352
0x91332d generic_simplify(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        /home/antoine/gcc/objdir/gcc/generic-match.c:24790
0x826037 fold_binary_loc(unsigned int, tree_code, tree_node*, tree_node*,
tree_node*)
        ../../srcdir/gcc/fold-const.c:9190
0xbc2eed cleanup_control_expr_graph
        ../../srcdir/gcc/tree-cfgcleanup.c:116
0xbc2eed cleanup_control_flow_bb
        ../../srcdir/gcc/tree-cfgcleanup.c:211
0xbc2eed cleanup_tree_cfg_bb
        ../../srcdir/gcc/tree-cfgcleanup.c:628
0xbc3548 cleanup_tree_cfg_1
        ../../srcdir/gcc/tree-cfgcleanup.c:681
0xbc3548 cleanup_tree_cfg_noloop
        ../../srcdir/gcc/tree-cfgcleanup.c:733
0xbc3548 cleanup_tree_cfg()
        ../../srcdir/gcc/tree-cfgcleanup.c:788
0xab7e44 execute_function_todo
        ../../srcdir/gcc/passes.c:1900
0xab8733 execute_todo
        ../../srcdir/gcc/passes.c:2005
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.

Reply via email to