diff mbox series

[alpha] : Fix PR92022, ICE in alpha_handle_trap_shadows

Message ID CAFULd4YVAMhCP8VoaHEikrcg3SZm0jfk0yTnYCBObCETgq1dQA@mail.gmail.com
State New
Headers show
Series [alpha] : Fix PR92022, ICE in alpha_handle_trap_shadows | expand

Commit Message

Uros Bizjak Oct. 10, 2019, 4:14 p.m. UTC
We have to handle (skip) DEBUG_INSN in alpha_handle_trap_shadows.

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

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

testsuite/ChangeLog:

2019-10-10  Uroš Bizjak  <ubizjak@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.
diff mbox series

Patch

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;
+}