https://gcc.gnu.org/bugzilla/show_bug.cgi?id=74765
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ebotcazou at gcc dot gnu.org --- Comment #10 from Eric Botcazou <ebotcazou at gcc dot gnu.org> --- I don't understand the new code in gimple_set_location: static inline void gimple_set_location (gimple *g, location_t location) { /* Copy the no-warning data to the statement location. */ copy_warning (location, g->location); g->location = location; } Typically g->location is UNKNOWN_LOCATION since the GIMPLE statement was just built so this does: copy_warning (location, UNKNOWN_LOCATION); and finally invokes nowarn_map->remove (location)? I can fix my particular problem by adding the obvious guard: static inline void gimple_set_location (gimple *g, location_t location) { /* Copy the no-warning data to the statement location. */ if (g->location != UNKNOWN_LOCATION) copy_warning (location, g->location); g->location = location; } but shouldn't the code query warning-control.cc instead to see if the no-warning bit is set on g?