https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80167
Bug ID: 80167 Summary: [6/7 Regression] ICE in translate_isl_ast_to_gimple::is_valid_rename at gcc/graphite-isl-ast-to-gimple.c:1139 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org Target Milestone: --- Started with r229889, we ICE on: $ cat /tmp/tmpium7rf86.i typedef struct { short a; short b; short c } d; d e[]; f[8]; g (d *i) { int h = 0; for (; h < 28; h++) e[h].a = e[h].b = i[h].a; h = 0; for (; h < 8; h++) f[h] = i[h].b + i[h].c; h = 0; for (; h < 8; h++) f[h] = i[h].b; } $ gcc -O2 -fno-tree-pta -floop-nest-optimize /tmp/tmpium7rf86.i /tmp/tmpium7rf86.i:6:1: warning: no semicolon at end of struct or union } d; ^ /tmp/tmpium7rf86.i:8:1: warning: data definition has no type or storage class f[8]; ^ /tmp/tmpium7rf86.i:8:1: warning: type defaults to ‘int’ in declaration of ‘f’ [-Wimplicit-int] /tmp/tmpium7rf86.i:9:1: warning: return type defaults to ‘int’ [-Wimplicit-int] g (d *i) ^ /tmp/tmpium7rf86.i:7:3: warning: array ‘e’ assumed to have one element d e[]; ^ /tmp/tmpium7rf86.i: In function ‘g’: /tmp/tmpium7rf86.i:13:21: warning: iteration 1 invokes undefined behavior [-Waggressive-loop-optimizations] e[h].a = e[h].b = i[h].a; ~~~~~~~^~~~~~~~ /tmp/tmpium7rf86.i:12:3: note: within this loop for (; h < 28; h++) ^~~ /tmp/tmpium7rf86.i:9:1: internal compiler error: Segmentation fault g (d *i) ^ 0xf444d0 crash_signal ../../gcc/toplev.c:337 0xa3734c dominated_by_p(cdi_direction, basic_block_def const*, basic_block_def const*) ../../gcc/dominance.c:1117 0x19649cb translate_isl_ast_to_gimple::is_valid_rename(tree_node*, basic_block_def*, basic_block_def*, phi_node_kind, tree_node*, basic_block_def*) const ../../gcc/graphite-isl-ast-to-gimple.c:1139 0x1964b95 translate_isl_ast_to_gimple::get_rename(basic_block_def*, tree_node*, basic_block_def*, phi_node_kind) const ../../gcc/graphite-isl-ast-to-gimple.c:1179 0x19666d1 translate_isl_ast_to_gimple::rename_uses(gimple*, gimple_stmt_iterator*, basic_block_def*, loop*, vec<tree_node*, va_heap, vl_ptr>) ../../gcc/graphite-isl-ast-to-gimple.c:1676 0x1968d0d translate_isl_ast_to_gimple::graphite_copy_stmts_from_block(basic_block_def*, basic_block_def*, vec<tree_node*, va_heap, vl_ptr>) ../../gcc/graphite-isl-ast-to-gimple.c:2572 0x19694a5 translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences(basic_block_def*, edge_def*, vec<tree_node*, va_heap, vl_ptr>) ../../gcc/graphite-isl-ast-to-gimple.c:2785 0x1964171 translate_isl_ast_to_gimple::translate_isl_ast_node_user(isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:904 0x1964545 translate_isl_ast_to_gimple::translate_isl_ast(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:1008 0x1964400 translate_isl_ast_to_gimple::translate_isl_ast_node_if(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:972 0x1964528 translate_isl_ast_to_gimple::translate_isl_ast(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:1005 0x196428b translate_isl_ast_to_gimple::translate_isl_ast_node_block(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:933 0x1964566 translate_isl_ast_to_gimple::translate_isl_ast(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:1012 0x196385d translate_isl_ast_to_gimple::translate_isl_ast_for_loop(loop*, isl_ast_node*, edge_def*, tree_node*, tree_node*, tree_node*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:653 0x1963dc1 translate_isl_ast_to_gimple::translate_isl_ast_node_for(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:815 0x1964504 translate_isl_ast_to_gimple::translate_isl_ast(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:1001 0x196428b translate_isl_ast_to_gimple::translate_isl_ast_node_block(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:933 0x1964566 translate_isl_ast_to_gimple::translate_isl_ast(loop*, isl_ast_node*, edge_def*, std::map<isl_id*, tree_node*, std::less<isl_id*>, std::allocator<std::pair<isl_id* const, tree_node*> > >&) ../../gcc/graphite-isl-ast-to-gimple.c:1012 0x1969eb6 graphite_regenerate_ast_isl(scop*) ../../gcc/graphite-isl-ast-to-gimple.c:3019 0x1960e66 graphite_transform_loops() ../../gcc/graphite.c:330