re PR fortran/10843 (g77 -ffree-form rejects "GO TO".)
authorDavid Billinghurst <David.Billinghurst@riotinto.com>
Tue, 27 May 2003 05:07:58 +0000 (05:07 +0000)
committerDavid Billinghurst <billingd@gcc.gnu.org>
Tue, 27 May 2003 05:07:58 +0000 (05:07 +0000)
2003-05-27  David Billinghurst (David.Billinghurst@riotinto.com)

PR fortran/10843
* g77.dg/ffixed-form-1.f: New test
* g77.dg/ffixed-form-2.f: New test
* g77.dg/ffree-form-2.f: New test - XFAIL pending fix
* g77.dg/ffree-form-3.f: New test

From-SVN: r67181

gcc/testsuite/ChangeLog
gcc/testsuite/g77.dg/ffixed-form-1.f [new file with mode: 0644]
gcc/testsuite/g77.dg/ffixed-form-2.f [new file with mode: 0644]
gcc/testsuite/g77.dg/ffree-form-2.f [new file with mode: 0644]
gcc/testsuite/g77.dg/ffree-form-3.f [new file with mode: 0644]

index 9e01a21da749f27254970adc36211a4e43046c1d..6f47f9a04dd75af7ceb6ae26407333a10ee8407e 100644 (file)
@@ -1,3 +1,11 @@
+2003-05-27  David Billinghurst (David.Billinghurst@riotinto.com)
+
+       PR fortran/10843
+       * g77.dg/ffixed-form-1.f: New test
+       * g77.dg/ffixed-form-2.f: New test
+       * g77.dg/ffree-form-2.f: New test - XFAIL pending fix 
+       * g77.dg/ffree-form-3.f: New test
+
 2003-05-26  Andreas Tobler <a.tobler@schweiz.ch>
 
        * gcc.dg/wchar_t-1.c: XFAIL on darwin, no wchar.h available.
diff --git a/gcc/testsuite/g77.dg/ffixed-form-1.f b/gcc/testsuite/g77.dg/ffixed-form-1.f
new file mode 100644 (file)
index 0000000..4b5f723
--- /dev/null
@@ -0,0 +1,6 @@
+! Test compiler flags: -ffixed-form
+! Origin: David Billinghurst <David.Billinghurst@riotinto.com>
+!
+! { dg-do compile }
+! { dg-options "-ffixed-form" }
+      end
diff --git a/gcc/testsuite/g77.dg/ffixed-form-2.f b/gcc/testsuite/g77.dg/ffixed-form-2.f
new file mode 100644 (file)
index 0000000..5f6980c
--- /dev/null
@@ -0,0 +1,12 @@
+! PR fortran/10843
+! Origin: Brad Davis <bdavis9659@comcast.net>
+!
+! { 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/g77.dg/ffree-form-2.f b/gcc/testsuite/g77.dg/ffree-form-2.f
new file mode 100644 (file)
index 0000000..aef9173
--- /dev/null
@@ -0,0 +1,12 @@
+! PR fortran/10843
+! Origin: Brad Davis <bdavis9659@comcast.net>
+!
+! { dg-do compile }
+! { dg-options "-ffree-form" }
+! { dg-excess-errors "GOTO" }
+      GO TO 3 
+      GOTO 3
+ 3    CONTINUE
+      GOTO = 55
+      END
+
diff --git a/gcc/testsuite/g77.dg/ffree-form-3.f b/gcc/testsuite/g77.dg/ffree-form-3.f
new file mode 100644 (file)
index 0000000..a30d604
--- /dev/null
@@ -0,0 +1,20 @@
+! Test acceptance of keywords in free format
+! Origin: David Billinghurst <David.Billinghurst@riotinto.com>
+!
+! { 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