aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/associate_51.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/associate_51.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/associate_51.f909
1 files changed, 8 insertions, 1 deletions
diff --git a/gcc/testsuite/gfortran.dg/associate_51.f90 b/gcc/testsuite/gfortran.dg/associate_51.f90
index 7b3edc4..b6ab141 100644
--- a/gcc/testsuite/gfortran.dg/associate_51.f90
+++ b/gcc/testsuite/gfortran.dg/associate_51.f90
@@ -14,7 +14,14 @@ end
recursive function f2()
associate (y1 => f2()) ! { dg-error "Invalid association target" }
end associate ! { dg-error "Expecting END FUNCTION statement" }
- associate (y2 => f2) ! { dg-error "is a procedure name" }
+end
+
+recursive function f3()
+ associate (y1 => f3)
+ print *, y1() ! { dg-error "Expected array subscript" }
+ end associate
+ associate (y2 => f3) ! { dg-error "Associate-name 'y2' at \\(1\\) is used as array" }
+ print *, y2(1)
end associate
end