1 ! { dg-options "-std=f95 -fall-intrinsics" }
4 ! Test PROTECTED attribute. Within the module everything is allowed.
5 ! Outside (use-associated): For pointers, their association status
6 ! may not be changed. For nonpointers, their value may not be changed.
14 integer, pointer :: ap
15 protected :: a, at, ap ! { dg-error "Fortran 2003: PROTECTED statement" }
20 integer, protected :: a ! { dg-error "Fortran 2003: PROTECTED attribute" }
21 integer, protected, target :: at ! { dg-error "Fortran 2003: PROTECTED attribute" }
22 integer, protected, pointer :: ap ! { dg-error "Fortran 2003: PROTECTED attribute" }