https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105113
Bug ID: 105113 Summary: [12 Regression] Analyzer segfaults on __func__ in static function Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: bero at lindev dot ch Target Milestone: --- This is a very recent regression (didn't happen with the 20220313 snapshot). $ cat test.c extern void a(char const *); static void b() { a(__func__); } void c() { b(); } $ gcc -O2 -fanalyzer -o test.o -c test.c during IPA pass: analyzer In function ‘b’, inlined from ‘c’ at test.c:3:12: test.c:2:19: internal compiler error: Segmentation fault 2 | static void b() { a(__func__); } | ^~~~~~~~~~~ 0x12faf21 internal_error(char const*, ...) ???:0 0x13a630f cgraph_node::get_edge(gimple*) ???:0 0xa81d47 ana::decl_region::calc_tracked_p(tree_node*) ???:0 0xa91c50 ana::region_model_manager::get_region_for_global(tree_node*) ???:0 0xa860b6 ana::region_model::get_rvalue_1(ana::path_var, ana::region_model_context*) const ???:0 0xa85a7a ana::region_model::get_rvalue(ana::path_var, ana::region_model_context*) const ???:0 0xa873ca ana::region_model::handle_unrecognized_call(gcall const*, ana::region_model_context*) ???:0 0xa73ae3 ana::exploded_node::on_stmt(ana::exploded_graph&, ana::supernode const*, gimple const*, ana::program_state*, ana::uncertainty_t*, ana::path_context*) ???:0 0xa73f41 ana::exploded_graph::process_node(ana::exploded_node*) ???:0 0xa74f01 ana::exploded_graph::process_worklist() ???:0 0xa762c9 ana::impl_run_checkers(ana::logger*) ???:0 0xa76a00 ana::run_checkers() ???:0 0x19724b6 execute_ipa_pass_list(opt_pass*) ???:0 0x190513b symbol_table::compile() ???:0 0x1904f08 symbol_table::finalize_compilation_unit() ???:0