Commit test case for PR 57129.
authorThomas König <tkoenig@gcc.gnu.org>
Sun, 19 Apr 2020 11:06:22 +0000 (13:06 +0200)
committerThomas König <tkoenig@gcc.gnu.org>
Sun, 19 Apr 2020 11:06:22 +0000 (13:06 +0200)
2020-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/57129
* gfortran.dg/subroutine_as_type.f90: New test.

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/subroutine_as_type.f90 [new file with mode: 0644]

index e874290..315a29b 100644 (file)
@@ -1,7 +1,12 @@
 2020-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
+       PR fortran/57129
+       * gfortran.dg/subroutine_as_type.f90: New test.
+
+2020-04-19  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
        PR fortran/93500
-       * arith_divide_3.f90: New test.
+       * gfortran.dg/arith_divide_3.f90: New test.
 
 2020-04-19  Jakub Jelinek  <jakub@redhat.com>
 
diff --git a/gcc/testsuite/gfortran.dg/subroutine_as_type.f90 b/gcc/testsuite/gfortran.dg/subroutine_as_type.f90
new file mode 100644 (file)
index 0000000..eb8240f
--- /dev/null
@@ -0,0 +1,7 @@
+
+subroutine t()
+  type t  ! { dg-error "FUNCTION attribute conflicts with SUBROUTINE attribute" }
+  end type t ! { dg-error "Expecting END SUBROUTINE statement" }
+  type, extends(t) :: t2   ! { dg-error "has not been previously defined" }
+  end type t2 ! { dg-error "Expecting END SUBROUTINE statement" }
+end