2 ! { dg-shouldfail "Invalid Fortran 2003 code" }
3 ! { dg-options "-std=f2003 -fall-intrinsics" }
6 ! Test PROTECTED attribute. Within the module everything is allowed.
7 ! Outside (use-associated): For pointers, their association status
8 ! may not be changed. For nonpointers, their value may not be changed.
10 ! Test of a invalid code
17 equivalence (a
,c
) ! { dg-error "Either all or none of the objects in the EQUIVALENCE" }
23 integer, protected
:: a
26 equivalence (a
,b
) ! { dg-error "Either all or none of the objects in the EQUIVALENCE" }
31 integer, protected
:: a
34 common /one
/ a
,b
! { dg-error "PROTECTED attribute conflicts with COMMON" }
35 common /two
/ c
,d
! { dg-error "PROTECTED attribute conflicts with COMMON" }
43 real, allocatable
, dimension(:) :: array
52 t
%j
= 15 ! { dg-error "variable definition context" }
53 nullify(t
%p
) ! { dg-error "pointer association context" }
54 allocate(t
%array(15))! { dg-error "variable definition context" }