diff options
author | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-03-07 00:25:30 +0000 |
---|---|---|
committer | Steven G. Kargl <kargl@gcc.gnu.org> | 2018-03-07 00:25:30 +0000 |
commit | 1d792a6d0ea784027892d8c82bb8f2d38406c187 (patch) | |
tree | 1f8380869822850a60e204eec23ea0bcd2233d94 /gcc | |
parent | 66a00b11a0eeff5f2737593ada5ac5acf334adeb (diff) | |
download | gcc-1d792a6d0ea784027892d8c82bb8f2d38406c187.zip gcc-1d792a6d0ea784027892d8c82bb8f2d38406c187.tar.gz gcc-1d792a6d0ea784027892d8c82bb8f2d38406c187.tar.bz2 |
re PR fortran/64107 ([F95] Pure function as array size)
2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/64107
* gfortran.dg/pr64107.f90: New test.
From-SVN: r258311
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr64107.f90 | 30 |
2 files changed, 35 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a41eaa..0440f02 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2018-03-06 Steven G. Kargl <kargl@gcc.gnu.org> + + PR fortran/64107 + * gfortran.dg/pr64107.f90: New test. + 2017-03-06 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/84697 diff --git a/gcc/testsuite/gfortran.dg/pr64107.f90 b/gcc/testsuite/gfortran.dg/pr64107.f90 new file mode 100644 index 0000000..7261594 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr64107.f90 @@ -0,0 +1,30 @@ +! { dg-do compile } +! PR fortran/64107 +! Code contribute by fxcoudert at gcc dot gnu dot org +! Appears to be fixed by patch for PR fortran/83633 +module m1 + +contains + pure integer function foo() + foo = 2 + end function +end module + +subroutine test + use m1 + integer :: x1(foo()) +end subroutine + +module m + use m1 + integer :: x2(foo()) ! { dg-error "array with nonconstant bounds" } +contains + subroutine sub + integer :: x3(foo()) + end subroutine +end module + +program p + use m1 + integer :: x4(foo()) ! { dg-error "array with nonconstant bounds" } +end program |