[Bug tree-optimization/84526] [8 Regression] ICE in generic_overlap at gcc/gimple-ssa-warn-restrict.c:927 since r257860

marxin at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 23 11:01:00 GMT 2018


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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
One more test-case with a bit different BT:

$ cat sis.i
typedef struct
{
  int a;
  char b[10];
} c;
c d;
unsigned long s;
void e (void) { __builtin_strncpy (d.b, (char*)&d, s); }

$ gcc  -O2 sis.i -Wall
during GIMPLE pass: strlen
sis.i: In function ‘e’:
sis.i:8:6: internal compiler error: Segmentation fault
 void e (void) { __builtin_strncpy (d.b, (char*)&d, s); }
      ^
0xfdd6a9 crash_signal
        ../../gcc/toplev.c:325
0xc33483 generic_overlap
        ../../gcc/gimple-ssa-warn-restrict.c:927
0xc3486b strcpy_overlap
        ../../gcc/gimple-ssa-warn-restrict.c:1178
0xc354f6 overlap
        ../../gcc/gimple-ssa-warn-restrict.c:1304
0xc355db maybe_diag_overlap
        ../../gcc/gimple-ssa-warn-restrict.c:1325
0xc37792 check_bounds_or_overlap(gcall*, tree_node*, tree_node*, tree_node*,
tree_node*, bool)
        ../../gcc/gimple-ssa-warn-restrict.c:1889
0x126022b handle_builtin_stxncpy
        ../../gcc/tree-ssa-strlen.c:2067
0x12638f8 strlen_check_and_optimize_stmt
        ../../gcc/tree-ssa-strlen.c:3143
0x1264f2f strlen_dom_walker::before_dom_children(basic_block_def*)
        ../../gcc/tree-ssa-strlen.c:3476
0x1b14bc7 dom_walker::walk(basic_block_def*)
        ../../gcc/domwalk.c:353
0x12651c0 execute
        ../../gcc/tree-ssa-strlen.c:3556


More information about the Gcc-bugs mailing list