1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! C736 If EXTENDS appears and the type being defined has a coarray ultimate
4 ! component, its parent type shall have a coarray ultimate component.
8 real,allocatable
, codimension
[:] :: parentField
11 type, extends(coarrayParent
) :: goodChildType
12 real, allocatable
, codimension
[:] :: childField
13 end type goodChildType
15 type, extends(coarrayParent
) :: brotherType
19 type, extends(brotherType
) :: grandChildType
20 real, allocatable
, codimension
[:] :: grandChildField
21 end type grandChildType
26 !ERROR: Type 'badchildtype' has a coarray ultimate component so the type at the base of its type extension chain ('plainparent') must be a type that has a coarray ultimate component
27 type, extends(plainParent
) :: badChildType
28 real, allocatable
, codimension
[:] :: childField
31 type, extends(plainParent
) :: plainChild
35 !ERROR: Type 'badchildtype2' has a coarray ultimate component so the type at the base of its type extension chain ('plainparent') must be a type that has a coarray ultimate component
36 type, extends(plainChild
) :: badChildType2
37 real, allocatable
, codimension
[:] :: childField
38 end type badChildType2
40 !ERROR: Type 'badchildtype3' has a coarray ultimate component so the type at the base of its type extension chain ('plainparent') must be a type that has a coarray ultimate component
41 type, extends(plainParent
) :: badChildType3
42 type(coarrayParent
) :: childField
43 end type badChildType3