1 ! RUN: %S/test_errors.sh %s %t %flang_fc1
3 ! C721 A type-param-value of * shall be used only
4 ! * to declare a dummy argument,
5 ! * to declare a named constant,
6 ! * in the type-spec of an ALLOCATE statement wherein each allocate-object is
7 ! a dummy argument of type CHARACTER with an assumed character length,
8 ! * in the type-spec or derived-type-spec of a type guard statement (11.1.11),
10 ! * in an external function, to declare the character length parameter of the function result.
12 character(len
=*), pointer :: arg
13 character*(*), parameter :: cvar1
= "abc"
15 character(len
=4_4) :: cvar3
16 !ERROR: An assumed (*) type parameter may be used only for a (non-statement function) dummy argument, associate name, named constant, or external function result
17 character(len
=*) :: cvar4
21 class(*), allocatable
:: x
23 type(derived(34)) :: a
26 character(len
=4) :: fun
30 select
type (ax
=> a
%x
)
33 type is (character(len
=*))
35 class
is (derived(param
=*))
41 allocate (character(len
=*) :: arg
)