summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/parens_5.f90
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gfortran.dg/parens_5.f90')
-rw-r--r--gcc/testsuite/gfortran.dg/parens_5.f9023
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/parens_5.f90 b/gcc/testsuite/gfortran.dg/parens_5.f90
new file mode 100644
index 000000000..ac631ef08
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/parens_5.f90
@@ -0,0 +1,23 @@
+! { dg-do run }
+! { dg-options "-std=legacy" }
+!
+! Another case of fallout from the original patch for PR14771
+! Testcase by Erik Zeek
+module para
+contains
+ function bobo(n)
+ integer, intent(in) :: n
+ character(len=(n)) :: bobo ! Used to fail here
+ bobo = "1234567890"
+ end function bobo
+end module para
+
+program test
+ use para
+ implicit none
+ character*5 c
+ c = bobo(5)
+ if (c .ne. "12345") call abort
+end program test
+
+! { dg-final { cleanup-modules "para" } }