https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71163
Bug ID: 71163 Summary: ICE in get_ubsan_type_info_for_type Product: gcc Version: 6.1.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org Target Milestone: --- This one seems to be fixed in trunk, I am opening it just in case: /* gcc -fsanitize=undefined */ /*p.c: In function ‘foo’: * p.c:15:6: internal compiler error: in get_ubsan_type_info_for_type, at ubsan.c:305 * void foo(int n) * ^~~ *0xba9f60 get_ubsan_type_info_for_type *../../gcc-7-235689/gcc/ubsan.c:305 *0xba9f60 ubsan_type_descriptor(tree_node*, ubsan_print_style) *../../gcc-7-235689/gcc/ubsan.c:454 *0xbaa4ec ubsan_expand_bounds_ifn(gimple_stmt_iterator*) *../../gcc-7-235689/gcc/ubsan.c:692 *0xbb01d9 execute *../../gcc-7-235689/gcc/sanopt.c:696 */ void foo(int n) { struct S { int i[n]; } ; struct S s[1]; int k=0; s[k]; }