PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gfortran.dg / coarray_34.f90
blobf2bc910d2b0bbb40f95d64bd5a599d6deefffaba
1 ! { dg-do compile }
2 ! { dg-options "-fcoarray=single" }
4 use iso_fortran_env
5 implicit none
7 type t
8 integer, pointer :: caf2[:] ! { dg-error "must be allocatable with deferred shape" }
9 end type t
11 integer, pointer :: caf[*] ! { dg-error "POINTER attribute conflicts with CODIMENSION attribute" }
13 type t2
14 type(lock_type), pointer :: lock_it ! { dg-error "Component lock_it at .1. of type LOCK_TYPE must have a codimension or be a subcomponent of a coarray, which is not possible as the component has the pointer attribute" }
15 end type t2
16 type(t2) :: caf3[*]
18 type t3
19 type(lock_type) :: x
20 end type t3
22 type t4
23 type(t3), pointer :: y ! { dg-error "Pointer component y at .1. has a noncoarray subcomponent of type LOCK_TYPE, which must have a codimension or be a subcomponent of a coarray" }
24 end type t4
26 end