We have to handle (skip) DEBUG_INSN in alpha_handle_trap_shadows.

2019-10-10  Uroš Bizjak  <ubiz...@gmail.com>

    PR target/92022
    * config/alpha/alpha.c (alpha_handle_trap_shadows): Skip DEBUG_INSN.

testsuite/ChangeLog:

2019-10-10  Uroš Bizjak  <ubiz...@gmail.com>

    PR target/92022
    * g++.dg/pr92022.C: New test.

Bootstrapped and regression tested on alpha-linux-gnu.

Committed to mainline, will be backported to release branches.

Uros.
Index: config/alpha/alpha.c
===================================================================
--- config/alpha/alpha.c        (revision 276808)
+++ config/alpha/alpha.c        (working copy)
@@ -8708,6 +8708,9 @@ alpha_handle_trap_shadows (void)
                    case CODE_LABEL:
                      goto close_shadow;
 
+                   case DEBUG_INSN:
+                     break;
+
                    default:
                      gcc_unreachable ();
                    }
Index: testsuite/g++.dg/pr92022.C
===================================================================
--- testsuite/g++.dg/pr92022.C  (nonexistent)
+++ testsuite/g++.dg/pr92022.C  (working copy)
@@ -0,0 +1,13 @@
+// { dg-do compile { target alpha*-*-* } }
+// { dg-options "-O1 -g -fno-var-tracking -mcpu=ev4 -mieee" }
+
+struct a {
+  a(long);
+};
+long b;
+void c() {
+  a d(1);
+  double e = b;
+  for (; b;)
+    d = e;
+}

Reply via email to