https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88957
Bug ID: 88957 Summary: ICE: Segmentation fault in tree_could_trap_p, at tree-eh.c:2672 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: d Assignee: ibuclaw at gdcproject dot org Reporter: gs...@t-online.de Target Milestone: --- With option -fsanitize=undefined at -O[23] : $ cat z1.d int f (const int[4] x) { int sum = 0; foreach (i; x) sum += i; return sum; } void main () { import core.simd : int4; f(int4.init.array); } $ gdc-9-20190120 -c z1.d -O2 $ $ gdc-9-20190120 -c z1.d -O2 -fsanitize=undefined during RTL pass: expand z1.d: In function 'D main': z1.d:10:5: internal compiler error: Segmentation fault 10 | f(int4.init.array); | ^ 0xb821cf crash_signal ../../gcc/toplev.c:326 0xbd18d3 tree_could_trap_p(tree_node*) ../../gcc/tree-eh.c:2672 0x8a09e4 set_mem_attributes_minus_bitpos(rtx_def*, tree_node*, int, poly_int<1u, long>) ../../gcc/emit-rtl.c:2016 0x8c9c54 expand_expr_real_1(tree_node*, rtx_def*, machine_mode, expand_modifier, rtx_def**, bool) ../../gcc/expr.c:10327 0x8d47f6 store_expr(tree_node*, rtx_def*, int, bool, bool) ../../gcc/expr.c:5648 0x8d553e expand_assignment(tree_node*, tree_node*, bool) ../../gcc/expr.c:5431 0x7d0f28 expand_gimple_stmt_1 ../../gcc/cfgexpand.c:3752 0x7d0f28 expand_gimple_stmt ../../gcc/cfgexpand.c:3850 0x7d3167 expand_gimple_basic_block ../../gcc/cfgexpand.c:5886 0x7d87a6 execute ../../gcc/cfgexpand.c:6509