https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97201
Bug ID: 97201 Summary: [11 Regression] ICE in location_wrapper_p at gcc/gcc/tree.h:4002 since r11-3410-g67aeddb785ddcc86 Product: gcc Version: 10.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 CC: msebor at gcc dot gnu.org Target Milestone: --- The following causes a new ICE: $ cat ice.ii void testNewUseAfterFree() { int *p = (int *)operator new(0); int j = *p; } $ g++ -Warray-bounds=2 -fnon-call-exceptions ice.ii -c -O2 ‘ during GIMPLE pass: vrp In function ‘void testNewUseAfterFree()’: Segmentation fault 1 | void testNewUseAfterFree() { | ^~~~~~~~~~~~~~~~~~~ 0x1611858 crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:329 0x7ffff788652f ??? /usr/src/debug/glibc-2.31-6.3.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0 0x9eb801 location_wrapper_p(tree_node const*) /home/marxin/Programming/gcc/gcc/tree.h:4002 0x9eb87e tree_strip_any_location_wrapper(tree_node*) /home/marxin/Programming/gcc/gcc/tree.h:4014 0x1a5d764 integer_all_onesp(tree_node const*) /home/marxin/Programming/gcc/gcc/tree.c:2658 0xb272ee dump_type_suffix /home/marxin/Programming/gcc/gcc/cp/error.c:955 0xb25496 dump_type /home/marxin/Programming/gcc/gcc/cp/error.c:587 0xb32bd6 type_to_string /home/marxin/Programming/gcc/gcc/cp/error.c:3206 0xb369ea cp_printer /home/marxin/Programming/gcc/gcc/cp/error.c:4286 0x27f333c pp_format(pretty_printer*, text_info*) /home/marxin/Programming/gcc/gcc/pretty-print.c:1475 0x27d722e diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*) /home/marxin/Programming/gcc/gcc/diagnostic.c:1205 0x27d98a8 diagnostic_impl /home/marxin/Programming/gcc/gcc/diagnostic.c:1355 0x27d98a8 warning_at(unsigned int, int, char const*, ...) /home/marxin/Programming/gcc/gcc/diagnostic.c:1492 0x255e9d1 array_bounds_checker::check_mem_ref(unsigned int, tree_node*, bool) /home/marxin/Programming/gcc/gcc/gimple-array-bounds.cc:697 0x255f962 array_bounds_checker::check_array_bounds(tree_node**, int*, void*) /home/marxin/Programming/gcc/gcc/gimple-array-bounds.cc:909 0x1a845f8 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*, tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*), void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*)) /home/marxin/Programming/gcc/gcc/tree.c:12001 0x11acac3 walk_gimple_op(gimple*, tree_node* (*)(tree_node**, int*, void*), walk_stmt_info*) /home/marxin/Programming/gcc/gcc/gimple-walk.c:202 0x255fa93 check_array_bounds_dom_walker::before_dom_children(basic_block_def*) /home/marxin/Programming/gcc/gcc/gimple-array-bounds.cc:966 0x253832d dom_walker::walk(basic_block_def*) /home/marxin/Programming/gcc/gcc/domwalk.c:309 0x255faf7 array_bounds_checker::check() /home/marxin/Programming/gcc/gcc/gimple-array-bounds.cc:980 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions.