aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/associate_58.f90
blob: 9c24f35c0d836882b4a8254924ea86b36175b36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
! { dg-do compile }
!
! PR fortran/104570
! The following used to cause an ICE because the string length
! evaluation of the (y) expression was not prepared to handle
! a non-scalar expression.

program p
   character(:), allocatable :: x(:)
   x = ['abc']
   call s
contains
   subroutine s
      associate (y => x)
         associate (z => (y))
            print *, z
         end associate
      end associate
   end
end