diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/nested_array_constructor_1.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/nested_array_constructor_1.f90 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/nested_array_constructor_1.f90 b/gcc/testsuite/gfortran.dg/nested_array_constructor_1.f90 new file mode 100644 index 000000000..54417a0de --- /dev/null +++ b/gcc/testsuite/gfortran.dg/nested_array_constructor_1.f90 @@ -0,0 +1,19 @@ +! { dg-do compile } +! This test is run with result-checking and -fbounds-check as +! nested_array_constructor_2.f90 + +! PR fortran/35846 +! This used to ICE because the charlength of the trim-expression was +! NULL. + +! Contributed by Tobias Burnus <burnus@gcc.gnu.org> + +implicit none +character(len=2) :: c(3) + +c = 'a' +c = (/ (/ trim(c(1)), 'a' /)//'c', 'cd' /) + +print *, c + +end |