1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
11 type, extends(shape
) :: rectangle
15 type, extends(rectangle
) :: square
18 TYPE(shape
), TARGET
:: shape_obj
19 TYPE(rectangle
), TARGET
:: rect_obj
20 !define polymorphic objects
21 class(shape
), pointer :: shape_lim_polymorphic
25 shape_lim_polymorphic
=> rect_obj
26 label
: select
type (shape_lim_polymorphic
)
28 label1
: select
type (shape_lim_polymorphic
)
29 !ERROR: SELECT TYPE construct name required but missing
31 select
type (shape_lim_polymorphic
)
32 !ERROR: SELECT TYPE construct name unexpected
34 select
type (shape_lim_polymorphic
)
39 shape_lim_polymorphic
=> rect_obj
40 !type-guard-stmt realted checks
41 label
: select
type (shape_lim_polymorphic
)
44 select
type (shape_lim_polymorphic
)
45 !ERROR: SELECT TYPE name not allowed
48 label
: select
type (shape_lim_polymorphic
)
49 !ERROR: SELECT TYPE name mismatch
50 type is (shape
) labelll