view gcc/testsuite/gfortran.dg/coarray_45.f90 @ 131:84e7813d76e9

gcc-8.2
author mir3636
date Thu, 25 Oct 2018 07:37:49 +0900
parents
children
line wrap: on
line source

! { 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