1 ! RUN: %python %S/test_errors.py %s %flang_fc1
10 type, extends(shape
) :: rectangle
14 type, extends(rectangle
) :: square
17 TYPE(shape
), TARGET
:: shape_obj
18 TYPE(rectangle
), TARGET
:: rect_obj
19 !define polymorphic objects
20 class(shape
), pointer :: shape_lim_polymorphic
24 shape_lim_polymorphic
=> rect_obj
25 label
: select
type (shape_lim_polymorphic
)
27 label1
: select
type (shape_lim_polymorphic
)
28 !ERROR: SELECT TYPE construct name required but missing
30 select
type (shape_lim_polymorphic
)
31 !ERROR: SELECT TYPE construct name unexpected
33 select
type (shape_lim_polymorphic
)
38 shape_lim_polymorphic
=> rect_obj
39 !type-guard-stmt realted checks
40 label
: select
type (shape_lim_polymorphic
)
43 select
type (shape_lim_polymorphic
)
44 !ERROR: SELECT TYPE name not allowed
47 label
: select
type (shape_lim_polymorphic
)
48 !ERROR: SELECT TYPE name mismatch
49 type is (shape
) labelll