1 ! RUN: %python %S/test_errors.py %s %flang_fc1
2 ! C721 A type-param-value of * shall be used only
3 ! * to declare a dummy argument,
4 ! * to declare a named constant,
5 ! * in the type-spec of an ALLOCATE statement wherein each allocate-object is
6 ! a dummy argument of type CHARACTER with an assumed character length,
7 ! * in the type-spec or derived-type-spec of a type guard statement (11.1.11),
9 ! * in an external function, to declare the character length parameter of the function result.
11 character(len
=*), pointer :: arg
12 character*(*), parameter :: cvar1
= "abc"
14 character(len
=4_4) :: cvar3
15 !ERROR: An assumed (*) type parameter may be used only for a (non-statement function) dummy argument, associate name, named constant, or external function result
16 character(len
=*) :: cvar4
20 class(*), allocatable
:: x
22 type(derived(34)) :: a
25 character(len
=4) :: fun
29 select
type (ax
=> a
%x
)
32 type is (character(len
=*))
34 class
is (derived(param
=*))
40 allocate (character(len
=*) :: arg
)