re PR debug/46756 (-fcompare-debug failure (length) with ASSIGN)
authorAlexandre Oliva <aoliva@redhat.com>
Mon, 13 Dec 2010 03:08:24 +0000 (03:08 +0000)
committerAlexandre Oliva <aoliva@gcc.gnu.org>
Mon, 13 Dec 2010 03:08:24 +0000 (03:08 +0000)
gcc/ChangeLog:
PR debug/46576
* jump.c (mark_all_labels): Skip debug insns.
gcc/testsuite/ChangeLog:
PR debug/46576
* gfortran.dg/debug/pr46576.f: New.

From-SVN: r167738

gcc/ChangeLog
gcc/jump.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/debug/pr46576.f [new file with mode: 0644]

index 92397f12d877d8fb9244be9667ccbd8ddcb04d5d..e31fb702fdca18142f58b9cb72319015cad52a31 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-13  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR debug/46576
+       * jump.c (mark_all_labels): Skip debug insns.
+
 2010-12-13  Alexandre Oliva  <aoliva@redhat.com>
 
        PR debug/46782
index b85326adeebc051fb1a6eebd9c89ead5a8793074..9721fe19e9e31b9ca8798f1fc2411e9b3a6df1d2 100644 (file)
@@ -193,7 +193,7 @@ mark_all_labels (rtx f)
   rtx prev_nonjump_insn = NULL;
 
   for (insn = f; insn; insn = NEXT_INSN (insn))
-    if (INSN_P (insn))
+    if (NONDEBUG_INSN_P (insn))
       {
        mark_jump_label (PATTERN (insn), insn, 0);
 
index 05a4341344399f1b7456f892d68841c944c73063..25dfba48bbceab26f3e901c95a28220bd231d4b2 100644 (file)
@@ -1,3 +1,8 @@
+2010-12-13  Alexandre Oliva  <aoliva@redhat.com>
+
+       PR debug/46576
+       * gfortran.dg/debug/pr46576.f: New.
+
 2010-12-13  Alexandre Oliva  <aoliva@redhat.com>
 
        PR debug/46782
diff --git a/gcc/testsuite/gfortran.dg/debug/pr46576.f b/gcc/testsuite/gfortran.dg/debug/pr46576.f
new file mode 100644 (file)
index 0000000..58fb301
--- /dev/null
@@ -0,0 +1,29 @@
+C PR debug/46576, reduced from ../20010519-1.f
+C { dg-do compile }
+C { dg-options "-O -fcompare-debug" }
+      LOGICAL QDISK,QDW,QCMPCT
+      LOGICAL LNOMA,LRAISE,LSCI,LBIG
+      ASSIGN 801 TO I800 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
+      GOTO 800
+ 801  CONTINUE
+      ASSIGN 761 TO I760 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
+ 761  CONTINUE
+      IF(LSCI) THEN
+         DO I=1,LENCM
+         ENDDO
+      ENDIF
+      DO WHILE((CVGMX.GT.TOLDIM).AND.(ITER.LT.ITMX))
+         IF(.NOT.QDW) THEN
+            ASSIGN 641 to I640 ! { dg-warning "Deleted feature: ASSIGN" "Deleted feature: ASSIGN" }
+            GOTO 640
+ 641        CONTINUE
+         ENDIF
+      ENDDO
+      GOTO 700
+ 640  CONTINUE
+      GOTO I640 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
+ 700  CONTINUE
+      GOTO I760 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
+ 800  CONTINUE
+      GOTO I800 ! { dg-warning "Deleted feature: Assigned" "Assigned GO TO" }
+      END