summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/pr78240.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/pr78240.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/pr78240.f9015
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr78240.f90 b/gcc/testsuite/gfortran.dg/pr78240.f90
new file mode 100644
index 00000000000..5373b555a50
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr78240.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-w" }
+!
+! PR fortran/78240
+!
+! Test a regression where an ICE occurred by passing an invalid reference
+! to the error handling routine for non-constant array-specs in DATA list
+! initializers.
+!
+
+program p
+ integer x(n) /1/ ! { dg-error "cannot appear in the expression" }
+end
+! { dg-prune-output "module or main program" }
+! { dg-prune-output "Nonconstant array" }