OSDN Git Service

fortran/
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gfortran.dg / protected_6.f90
index 5072949..5b71f8b 100644 (file)
@@ -27,6 +27,7 @@ program main
   allocate(ap) ! { dg-error "Assigning to PROTECTED variable" }
   ap = 73      ! { dg-error "Assigning to PROTECTED variable" }
   call increment(a,at) ! { dg-error "use-associated with PROTECTED attribute" }
+  call pointer_assignments(ap) ! { dg-error "is use-associated with PROTECTED attribute" }
 contains
   subroutine increment(a1,a3)
     integer, intent(inout) :: a1, a3
@@ -34,8 +35,8 @@ contains
     a3 = a3 + 1
   end subroutine increment
   subroutine pointer_assignments(p)
-    integer, pointer :: p ! with [pointer] intent(out)
-    p => null()           ! this is invalid
+    integer, pointer,intent (inout) :: p
+    p => null()
   end subroutine pointer_assignments
 end program main