https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121045

--- Comment #12 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> Yes and that is similar what to what I came up with too. But that conflicted
> with what Honza written in the commit about skipping debug statements so I
> was not sure it was the right way forward or not.

I don't see how the current code can possibly work with -fcompare-debug.  For
the sake of completeness, here's the code whose removal is problematic/wrong:

-         /* Don't allow debug stmts to affect discriminators, but
-            allow them to take discriminators when they're on the
-            same line as the preceding nondebug stmt.  */
-         if (is_gimple_debug (stmt))
-           {
-             if (curr_locus != UNKNOWN_LOCATION
-                 && same_line_p (curr_locus, &curr_locus_e,
-                                 gimple_location (stmt)))
-               {
-                 location_t loc = gimple_location (stmt);
-                 location_t dloc = location_with_discriminator (loc,
-                                                                curr_discr);
-                 gimple_set_location (stmt, dloc);
-               }
-             continue;
-           }

Reply via email to