2 ! { dg-shouldfail "Invalid use of VOLATILE" }
3 ! Test whether volatile statements and attributes are
4 ! properly error checked.
8 real, external, volatile :: foo
! { dg-error "VOLATILE attribute conflicts with EXTERNAL attribute" }
9 real, intrinsic, volatile :: sin
! { dg-error "VOLATILE attribute conflicts with INTRINSIC attribute" }
10 real, parameter, volatile :: r
= 5.5 ! { dg-error "PARAMETER attribute conflicts with VOLATILE attribute" }
13 real, volatile,volatile :: r
= 3. ! { dg-error "Duplicate VOLATILE attribute" }
14 volatile :: l
,n
! { dg-warning "Duplicate VOLATILE attribute" }
15 volatile ! { dg-error "Syntax error in VOLATILE statement" }
16 volatile :: volatile_test
! { dg-error "PROGRAM attribute conflicts with VOLATILE attribute" }
20 subroutine foo(a
) ! { dg-error "has no IMPLICIT type" } ! due to error below
21 integer, intent(in
), volatile :: a
! { dg-error "VOLATILE attribute conflicts with INTENT\\(IN\\)" }
23 end program volatile_test