aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/dec_structure_20.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/dec_structure_20.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/dec_structure_20.f9018
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/dec_structure_20.f90 b/gcc/testsuite/gfortran.dg/dec_structure_20.f90
new file mode 100644
index 00000000000..9e952040076
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dec_structure_20.f90
@@ -0,0 +1,18 @@
+ ! { dg-do compile }
+ ! { dg-options "-fdec-structure" }
+ !
+ ! Test error handling for %FILL
+ !
+ implicit none
+
+ structure /s/
+ integer(2) i /3/
+ integer(2) %fill /4/ ! { dg-error "cannot have an initializer" }
+ integer(2), pointer :: %fill ! { dg-error "cannot have attributes" }
+ end structure
+
+ type t
+ integer %fill ! { dg-error "not allowed outside STRUCTURE" }
+ endtype
+
+ end