https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106208
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|fortran |middle-end Priority|P3 |P2 --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- #1 0x0000000001423960 in branch_prob (thunk=false) at /home/rguenther/src/trunk/gcc/profile.cc:1459 1459 gcc_checking_assert (!RESERVED_LOCATION_P (loc)); (gdb) l 1454 gcov_position_t offset = 0; 1455 1456 if (bb == ENTRY_BLOCK_PTR_FOR_FN (cfun)->next_bb) 1457 { 1458 location_t loc = DECL_SOURCE_LOCATION (current_function_decl); 1459 gcc_checking_assert (!RESERVED_LOCATION_P (loc)); 1460 seen_locations.add (loc); 1461 expanded_location curr_location = expand_location (loc); 1462 output_location (&streamed_locations, curr_location.file, 1463 MAX (1, curr_location.line), &offset, bb); (gdb) p loc $1 = 0 (gdb) p current_function_decl $2 = <function_decl 0x7ffff6317d00 _caf_init.0> (gdb) p $2->decl_common.artificial_flag $3 = 0 I was to say that for artificial functions a reserved location could be expected. But _caf_init.0 isn't even artificial (which is probably a bug). In the non-entry block case we do if (!RESERVED_LOCATION_P (loc)) { seen_locations.add (loc); which seems an obvious thing to do here as well. But it's really Thomas who should comment since he put in the assert (uncovering a previous issue). Not really a frontend bug (if it were DECL_ARTIFICIAL the ICE would occur anyway).