aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/debug
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
committerBen Cheng <bccheng@google.com>2014-03-25 22:37:19 -0700
commit1bc5aee63eb72b341f506ad058502cd0361f0d10 (patch)
treec607e8252f3405424ff15bc2d00aa38dadbb2518 /gcc-4.9/gcc/testsuite/gfortran.dg/debug
parent283a0bf58fcf333c58a2a92c3ebbc41fb9eb1fdb (diff)
downloadtoolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.gz
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.tar.bz2
toolchain_gcc-1bc5aee63eb72b341f506ad058502cd0361f0d10.zip
Initial checkin of GCC 4.9.0 from trunk (r208799).
Change-Id: I48a3c08bb98542aa215912a75f03c0890e497dba
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/debug')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/debug.exp41
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-dwarf2.f38
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f35
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr37738.f31
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr43166.f14
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr46756.f29
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/debug/trivial.f2
7 files changed, 190 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/debug.exp b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/debug.exp
new file mode 100644
index 000000000..d43475076
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/debug.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
+
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it under
+# the terms of the GNU General Public License as published by the Free
+# Software Foundation; either version 3, or (at your option) any later
+# version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gfortran-dg.exp
+load_lib gfortran.exp
+
+# Debugging testsuite proc
+proc gfortran-debug-dg-test { prog do_what extra_tool_flags } {
+ return [gfortran-dg-test $prog $do_what $extra_tool_flags]
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+
+gfortran_init
+
+gfortran-dg-debug-runtest gfortran_target_compile trivial.f "" \
+ [lsort [glob -nocomplain $srcdir/$subdir/*.\[fS\]]]
+
+# All done.
+dg-finish
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-dwarf2.f b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-dwarf2.f
new file mode 100644
index 000000000..40c13a4a1
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-dwarf2.f
@@ -0,0 +1,38 @@
+C Test program for common block debugging. G. Helffrich 11 July 2004.
+C { dg-do compile }
+C { dg-skip-if "DWARF-2 only" { "*-*-*" } { "*" } { "-gdwarf-2" } }
+C { dg-skip-if "DWARF-2 only" { "*-*-*" } { "-g1" } { "" } }
+C { dg-options "-dA -gno-strict-dwarf" }
+ common i,j
+ common /label/l,m
+ i = 1
+ j = 2
+ k = 3
+ l = 4
+ m = 5
+ call sub
+ end
+ subroutine sub
+ common /label/l,m
+ logical first
+ save n
+ data first /.true./
+ if (first) then
+ n = 0
+ first = .false.
+ endif
+ n = n + 1
+ l = l + 1
+ return
+ end
+
+C { dg-final { scan-assembler "DIE\[^\n\]*DW_TAG_common_block" } }
+C { dg-final { scan-assembler "(DW_AT_name: \"__BLNK__\"|\"__BLNK__\[^\n\]*\"\[^\n\]*DW_AT_name)" } }
+C { dg-final { scan-assembler "DIE\[^\n\]*DW_TAG_variable" } }
+C { dg-final { scan-assembler "\"i\[^\n\]*\"\[^\n\]*DW_AT_name" } }
+C { dg-final { scan-assembler "\"j\[^\n\]*\"\[^\n\]*DW_AT_name" } }
+C { dg-final { scan-assembler "DIE\[^\n\]*DW_TAG_common_block" } }
+C { dg-final { scan-assembler "(DW_AT_name: \"label\"|\"label\[^\n\]*\"\[^\n\]*DW_AT_name)" } }
+C { dg-final { scan-assembler "DIE\[^\n\]*DW_TAG_variable" } }
+C { dg-final { scan-assembler "\"l\[^\n\]*\"\[^\n\]*DW_AT_name" } }
+C { dg-final { scan-assembler "\"m\[^\n\]*\"\[^\n\]*DW_AT_name" } }
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
new file mode 100644
index 000000000..fd731994f
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
@@ -0,0 +1,35 @@
+C Test program for common block debugging. G. Helffrich 11 July 2004.
+C { dg-do compile }
+C { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } }
+C { dg-skip-if "No stabs" {*-*-* } { "*" } { "-gstabs" } }
+ common i,j
+ common /label/l,m
+ i = 1
+ j = 2
+ k = 3
+ l = 4
+ m = 5
+ call sub
+ end
+ subroutine sub
+ common /label/l,m
+ logical first
+ save n
+ data first /.true./
+ if (first) then
+ n = 0
+ first = .false.
+ endif
+ n = n + 1
+ l = l + 1
+ return
+ end
+
+C { dg-final { scan-assembler ".stabs.*\"__BLNK__\",226" } }
+C { dg-final { scan-assembler ".stabs.*\"i:V.*\",.*,0" } }
+C { dg-final { scan-assembler ".stabs.*\"j:V.*\",.*,4" } }
+C { dg-final { scan-assembler ".stabs.*\"__BLNK__\",228" } }
+C { dg-final { scan-assembler ".stabs.*\"label_\",226" } }
+C { dg-final { scan-assembler ".stabs.*\"l:V.*\",.*,0" } }
+C { dg-final { scan-assembler ".stabs.*\"m:V.*\",.*,4" } }
+C { dg-final { scan-assembler ".stabs.*\"label_\",228" } }
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr37738.f b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr37738.f
new file mode 100644
index 000000000..fddc44c7a
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr37738.f
@@ -0,0 +1,31 @@
+C PR debug/37738
+C { dg-do compile }
+C { dg-skip-if "DWARF-2 only" { "*-*-*" } { "*" } { "-gdwarf-2" } }
+C { dg-skip-if "DWARF-2 only" { "*-*-*" } { "-g1" } { "" } }
+C { dg-options "-dA -gno-strict-dwarf" }
+
+ subroutine a
+ integer*4 a_i, c_i
+ common /block/a_i, c_i
+ a_i = 1
+ c_i = 4
+ end subroutine a
+ subroutine b
+ integer*4 b_i
+ common /block/b_i, d_i
+ b_i = 2
+ d_i = 5
+ end subroutine b
+ subroutine c
+ integer*4 a_i, c_i
+ common /block/a_i, c_i
+ if (a_i .ne. 2) call abort
+ if (c_i .ne. 5) call abort
+ end subroutine c
+ program abc
+ call a
+ call b
+ call c
+ end program abc
+
+C { dg-final { scan-assembler-times "DIE\[^\n\]*DW_TAG_common_block" 3 } }
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr43166.f b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr43166.f
new file mode 100644
index 000000000..a3146150b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr43166.f
@@ -0,0 +1,14 @@
+C PR debug/43166
+C { dg-do compile }
+C { dg-options "-O" }
+ SUBROUTINE FOO ()
+ INTEGER V1
+ COMMON // V1
+ END
+ SUBROUTINE BAR ()
+ INTEGER V0,V1,V2,V3
+ COMMON // V1(4),V2(85,4),V3
+ DO V3=1,V1(1)
+ V0=V2(V3,1)
+ END DO
+ END
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr46756.f b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr46756.f
new file mode 100644
index 000000000..fab06e394
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/pr46756.f
@@ -0,0 +1,29 @@
+C PR debug/46756, 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
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/debug/trivial.f b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/trivial.f
new file mode 100644
index 000000000..4c3556725
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/debug/trivial.f
@@ -0,0 +1,2 @@
+ program trivial
+ end