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

Andrey Belevantsev <abel at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |abel at gcc dot gnu.org

--- Comment #4 from Andrey Belevantsev <abel at gcc dot gnu.org> ---
Sigh, I've put the condition that was too broad in the previous patch and also
allowed some legitimate dependencies between debug insns (so Alex was kind of
right when he expressed his concern).  I'm testing the following after checking
that all of the previous PRs and this one passes:

diff --git a/gcc/sel-sched-ir.c b/gcc/sel-sched-ir.c
index ee970522890..85ff5bd3eb4 100644
--- a/gcc/sel-sched-ir.c
+++ b/gcc/sel-sched-ir.c
@@ -3308,7 +3308,7 @@ has_dependence_note_dep (insn_t pro, ds_t ds
ATTRIBUTE_UNUSED)
      that a bookkeeping copy should be movable as the original insn.
      Detect that here and allow that movement if we allowed it before
      in the first place.  */
-  if (DEBUG_INSN_P (real_con)
+  if (DEBUG_INSN_P (real_con) && !DEBUG_INSN_P (real_pro)
       && INSN_UID (NEXT_INSN (pro)) == INSN_UID (real_con))
     return;

Reply via email to