3 ! Test the implementation of inquiry part references (PR40196):
4 ! Check errors on invalid code.
6 ! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
14 character(:), allocatable
:: b
19 a
%kind
= 2 ! { dg-error "Assignment to a constant expression" }
20 b
%len
= 2 ! { dg-error "parameter inquiry" }
23 print *, z
%re
! { dg-error "must be applied to a COMPLEX expression" }
24 print *, z
%im
! { dg-error "must be applied to a COMPLEX expression" }
25 i
%re
= 2.0 ! { dg-error "must be applied to a COMPLEX expression" }
26 print *, i
%len
! { dg-error "must be applied to a CHARACTER expression" }
27 print *, s
%kind
! { dg-error "is not a member" }
28 print *, s
%z
%kind
! OK