diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2021-02-02 13:55:50 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2021-02-02 13:55:50 +0000 |
commit | 831ff94a882149616b17132d23478c9d1fcbdcd6 (patch) | |
tree | 88e0803d93df5c32cf0159c27fbc2c637af09a6d /gcc | |
parent | 13d8be91218950707bf38bdb1c554cf1605e4501 (diff) |
Fortran: Check remains fixed by patch for PRs 96100/101 [PR91862].
2021-02-02 Paul Thomas <pault@gcc.gnu.org>
gcc/testsuite
PR fortran/91862
* gfortran.dg/pr91862.f90: New test.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gfortran.dg/pr91862.f90 | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/pr91862.f90 b/gcc/testsuite/gfortran.dg/pr91862.f90 new file mode 100644 index 00000000000..17d5cdd035f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/pr91862.f90 @@ -0,0 +1,26 @@ +! { dg-do compile } +! +! Check that PR91862 remains fixed by patch for PRs 96100/101. +! +! Contributed by Gerhard Steinmetz <>gscfq@t-online.de> +! + call foo + call bar +contains + + subroutine foo + integer :: i + character(3) :: a(3) = 'abc' + character(1) :: b(1) + b = [([ (a(1)(i:1), i=1,1) ])] + print *, b + end subroutine + + subroutine bar + integer :: i + character(3) :: a(3) = 'abc' + character(1) :: b(1) + b = [([ (a(1)(1:i), i=1,1) ])] + print *, b + end subroutine +end |