aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/implicit_8.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gfortran.dg/implicit_8.f90')
-rw-r--r--gcc-4.9/gcc/testsuite/gfortran.dg/implicit_8.f9016
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gfortran.dg/implicit_8.f90 b/gcc-4.9/gcc/testsuite/gfortran.dg/implicit_8.f90
new file mode 100644
index 000000000..bdd11e615
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gfortran.dg/implicit_8.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! PR 24748
+
+! The compiler used to crash trying to take a substring of an implicit
+! real scalar.
+subroutine variant1
+ ybtable=ylocal(1:2) ! { dg-error "Syntax error in argument list" }
+end
+
+! We want the behavior to be the same whether ylocal is implicitly
+! or explicitly typed.
+subroutine variant2
+ real ylocal
+ ybtable=ylocal(1:2) ! { dg-error "Syntax error in argument list" }
+end
+