Debian Codegraph @

gcc/testsuite/gfortran.dg/coarray_45.f90

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