nvptx, libgfortran: Switch out of "minimal" mode
[official-gcc.git] / gcc / testsuite / gfortran.dg / protected_3.f90
blob95cdad057cfbc1614a21c3b0d1ef7fdbfc953990
1 ! { dg-options "-std=f95" }
2 ! PR fortran/23994
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.
8 ! Reject in Fortran 95
10 module protmod
11 implicit none
12 integer :: a
13 integer, target :: at
14 integer, pointer :: ap
15 protected :: a, at, ap ! { dg-error "Fortran 2003: PROTECTED statement" }
16 end module protmod
18 module protmod2
19 implicit none
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" }
23 end module protmod2