https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121045
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> ---
This is sufficient to fix the regressions:
diff --git a/gcc/tree-cfg.cc b/gcc/tree-cfg.cc
index 649c8558d94..abc89f3ef8e 100644
--- a/gcc/tree-cfg.cc
+++ b/gcc/tree-cfg.cc
@@ -1139,7 +1139,7 @@ assign_discriminators (void)
{
gimple *stmt = gsi_stmt (gsi);
location_t loc = gimple_location (stmt);
- if (loc == UNKNOWN_LOCATION)
+ if (loc == UNKNOWN_LOCATION || is_gimple_debug (stmt))
continue;
if (loc == prev_loc)
gimple_set_location (stmt, prev_replacement);