summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/asan/associate_59.f90
blob: 9bfb2bfbafb9666e8401db7fe423918d6f59834e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
! { dg-do compile }
! { dg-additional-options "-O0" }
!
! PR fortran/104228
! The code generated code for the program below wrongly pushed the Y character
! length variable to both P and S scope, which was leading to an ICE when
! address sanitizer was in effect
 
program p
   character(:), allocatable :: x(:)
   call s
contains
   subroutine s
      associate (y => x)
         y = [x]
      end associate
   end
end