summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/array_constructor_30.f03
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/array_constructor_30.f03')
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_30.f0316
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_30.f03 b/gcc/testsuite/gfortran.dg/array_constructor_30.f03
new file mode 100644
index 000000000..587ce0397
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_30.f03
@@ -0,0 +1,16 @@
+! { dg-do compile }
+
+! PR fortran/36492
+! Similar to the ICE-test, but now test for complaint about constant
+! specification expression.
+
+implicit none
+
+integer :: a = 42
+type t
+ character (a) :: arr (1) = [ "a" ]
+ ! { dg-error "in the expression" "" { target *-*-* } 11 }
+ ! { dg-error "specification expression" "" { target *-*-* } 11 }
+end type t
+
+end