From: David Billinghurst Date: Sat, 10 Jul 2004 12:23:45 +0000 (+0000) Subject: ffixed-form-1.f: Copy from g77.dg X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c2a3d7ec5344dd2de0f34ff32a754b344743366;p=gcc.git ffixed-form-1.f: Copy from g77.dg 2004-07-10 David Billinghurst (David.Billinghurst@riotinto.com) * gfortran.dg/g77/ffixed-form-1.f: Copy from g77.dg * gfortran.dg/g77/ffixed-form-2.f: Likewise * gfortran.dg/g77/ffree-form-1.f: Likewise * gfortran.dg/g77/ffree-form-2.f: Likewise * gfortran.dg/g77/ffree-form-3.f: Likewise * gfortran.dg/g77/fno-underscoring.f: Likewise * gfortran.dg/g77/funderscoring.f: Likewise * gfortran.dg/g77/pr9258.f: Likewise. Add dg-warning lines. From-SVN: r84455 --- diff --git a/gcc/testsuite/gfortran.dg/g77/ffixed-form-1.f b/gcc/testsuite/gfortran.dg/g77/ffixed-form-1.f new file mode 100644 index 00000000000..4b5f72301da --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/ffixed-form-1.f @@ -0,0 +1,6 @@ +! Test compiler flags: -ffixed-form +! Origin: David Billinghurst +! +! { dg-do compile } +! { dg-options "-ffixed-form" } + end diff --git a/gcc/testsuite/gfortran.dg/g77/ffixed-form-2.f b/gcc/testsuite/gfortran.dg/g77/ffixed-form-2.f new file mode 100644 index 00000000000..5f6980ca0ac --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/ffixed-form-2.f @@ -0,0 +1,12 @@ +! PR fortran/10843 +! Origin: Brad Davis +! +! { dg-do compile } +! { dg-options "-ffixed-form" } + GO TO 3 + GOTO 3 + 3 CONTINUE + GOTO = 55 + GO TO = 55 + END + diff --git a/gcc/testsuite/gfortran.dg/g77/ffree-form-1.f b/gcc/testsuite/gfortran.dg/g77/ffree-form-1.f new file mode 100644 index 00000000000..88ddeefb32c --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/ffree-form-1.f @@ -0,0 +1,6 @@ +! Test compiler flags: -ffree-form +! Origin: David Billinghurst +! +! { dg-do compile } +! { dg-options "-ffree-form" } +end diff --git a/gcc/testsuite/gfortran.dg/g77/ffree-form-2.f b/gcc/testsuite/gfortran.dg/g77/ffree-form-2.f new file mode 100644 index 00000000000..b07db218789 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/ffree-form-2.f @@ -0,0 +1,11 @@ +! PR fortran/10843 +! Origin: Brad Davis +! +! { dg-do compile } +! { dg-options "-ffree-form" } + GO TO 3 + GOTO 3 + 3 CONTINUE + GOTO = 55 + END + diff --git a/gcc/testsuite/gfortran.dg/g77/ffree-form-3.f b/gcc/testsuite/gfortran.dg/g77/ffree-form-3.f new file mode 100644 index 00000000000..a30d6046081 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/ffree-form-3.f @@ -0,0 +1,20 @@ +! Test acceptance of keywords in free format +! Origin: David Billinghurst +! +! { dg-do compile } +! { dg-options "-ffree-form" } + integer i, j + i = 1 + if ( i .eq. 1 ) then + go = 2 + endif + if ( i .eq. 3 ) then + i = 4 + end if + do i = 1, 3 + j = i + end do + do j = 1, 3 + i = j + enddo + end diff --git a/gcc/testsuite/gfortran.dg/g77/fno-underscoring.f b/gcc/testsuite/gfortran.dg/g77/fno-underscoring.f new file mode 100644 index 00000000000..b91320b4c0b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/fno-underscoring.f @@ -0,0 +1,8 @@ +C Test compiler flags: -fno-underscoring +C Origin: David Billinghurst +C +C { dg-do compile } +C { dg-options "-fno-underscoring" } + call aaabbbccc + end +C { dg-final { scan-assembler-not "aaabbbccc_" } } diff --git a/gcc/testsuite/gfortran.dg/g77/funderscoring.f b/gcc/testsuite/gfortran.dg/g77/funderscoring.f new file mode 100644 index 00000000000..720b3a7e3e1 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/funderscoring.f @@ -0,0 +1,8 @@ +C Test compiler flags: -funderscoring +C Origin: David Billinghurst +C +C { dg-do compile } +C { dg-options "-funderscoring" } + call aaabbbccc + end +C { dg-final { scan-assembler "aaabbbccc_" } } diff --git a/gcc/testsuite/gfortran.dg/g77/pr9258.f b/gcc/testsuite/gfortran.dg/g77/pr9258.f new file mode 100644 index 00000000000..6de78454ede --- /dev/null +++ b/gcc/testsuite/gfortran.dg/g77/pr9258.f @@ -0,0 +1,18 @@ +C Test case for PR/9258 +C Origin: kmccarty@princeton.edu +C +C { dg-do compile } + SUBROUTINE FOO (B) + + 10 CALL BAR (A) + ASSIGN 20 TO M !{ dg-warning "Obsolete: ASSIGN" "" } + IF (100.LT.A) GOTO 10 + GOTO 40 +C + 20 IF (B.LT.ABS(A)) GOTO 10 + ASSIGN 30 TO M !{ dg-warning "Obsolete: ASSIGN" "" } + GOTO 40 +C + 30 ASSIGN 10 TO M !{ dg-warning "Obsolete: ASSIGN" "" } + 40 GOTO M,(10,20,30) !{ dg-warning "Obsolete: Assigned GOTO" "" } + END