1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C736 If EXTENDS appears and the type being defined has a coarray ultimate
3 ! component, its parent type shall have a coarray ultimate component.
7 real,allocatable
, codimension
[:] :: parentField
10 type, extends(coarrayParent
) :: goodChildType
11 real, allocatable
, codimension
[:] :: childField
12 end type goodChildType
14 type, extends(coarrayParent
) :: brotherType
18 type, extends(brotherType
) :: grandChildType
19 real, allocatable
, codimension
[:] :: grandChildField
20 end type grandChildType
25 !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
26 type, extends(plainParent
) :: badChildType
27 real, allocatable
, codimension
[:] :: childField
30 type, extends(plainParent
) :: plainChild
34 !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
35 type, extends(plainChild
) :: badChildType2
36 real, allocatable
, codimension
[:] :: childField
37 end type badChildType2
39 !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
40 type, extends(plainParent
) :: badChildType3
41 type(coarrayParent
) :: childField
42 end type badChildType3