diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/charlen_17.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/charlen_17.f90 | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/charlen_17.f90 b/gcc/testsuite/gfortran.dg/charlen_17.f90 new file mode 100644 index 00000000000..6b766d8f433 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/charlen_17.f90 @@ -0,0 +1,14 @@ +! { dg-do compile } +! PR 87673 - used to cause errors about non-pure functions. + +module x + implicit none +contains + pure function foo() result(res) + character(len=:), allocatable :: res + allocate (character(bar()) :: res) + end function foo + pure integer function bar() + bar = 1 + end function bar +end module x |