aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/coarray_45.f90
blob: 87763563efe84a1d7ffb1b2d3eb0f5bdc04d0b55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
! { dg-do compile }
! { dg-options "-fcoarray=lib -lcaf_single " }
!
! Test the fix for PR83076
!
module m
   type t
      integer, pointer :: z
   end type
   type(t) :: ptr
contains
   function g(x)
      type(t) :: x[*]
      if (associated (x%z, ptr%z)) deallocate (x%z) ! This used to ICE with -fcoarray=lib
   end
end module

  use m
contains
   function f(x)
      type(t) :: x[*]
      if (associated (x%z, ptr%z)) deallocate (x%z)
   end
end