summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pdt_16.f03
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pdt_16.f03')
-rw-r--r--gcc/testsuite/gfortran.dg/pdt_16.f0321
1 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pdt_16.f03 b/gcc/testsuite/gfortran.dg/pdt_16.f03
new file mode 100644
index 00000000000..067d87d660d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pdt_16.f03
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! Test the fix for all three errors in PR82586
+!
+! Contributed by G Steinmetz <gscfq@t-online.de>
+!
+module m
+ type t(a) ! { dg-error "does not have a component" }
+ end type
+end
+
+program p
+ type t(a ! { dg-error "Expected parameter list" }
+ integer, kind :: a
+ real(a) :: x
+ end type
+ type u(a, a) ! { dg-error "Duplicate name" }
+ integer, kind :: a ! { dg-error "already declared" }
+ integer, len :: a ! { dg-error "already declared" }
+ end type
+end