https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79558
Bug ID: 79558 Summary: ICE: Segfault in ubsan_type_descriptor, at ubsan.c:412 Product: gcc Version: 7.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: gerhard.steinmetz.fort...@t-online.de Target Milestone: --- Versions 5/6/7 together with option -fsanitize=undefined (or -fsanitize=bounds, or -fsanitize=bounds-strict) : $ cat z1.c void fn1 (int n) { int i, j; int x[2][0]; for (i = 0; i < n; i++) for (j = 0; j < n; j++) x[i][j] = 5; } $ gcc-7-20170212 -fsanitize=undefined -c z1.c z1.c: In function 'fn1': z1.c:1:6: internal compiler error: Segmentation fault void fn1 (int n) ^~~ 0xbf762f crash_signal ../../gcc/toplev.c:333 0xc1b474 ubsan_type_descriptor(tree_node*, ubsan_print_style) ../../gcc/ubsan.c:412 0xc1c671 ubsan_expand_bounds_ifn(gimple_stmt_iterator*) ../../gcc/ubsan.c:698 0xc226e9 execute ../../gcc/sanopt.c:922