1! { dg-do compile }
2! { dg-shouldfail "VOLATILE not part of F95" }
3! { dg-options "-std=f95" }
4! Test whether volatile statements and attributes are rejected
5! with -std=f95.
6! PR fortran/29601
7program volatile_test
8  implicit none
9  real, volatile :: foo ! { dg-error "VOLATILE attribute" }
10  real :: l
11  volatile :: l         ! { dg-error "VOLATILE statement" }
12  l   = 4.0
13  foo = 3.0             ! { dg-error "no IMPLICIT type" }
14end program volatile_test
15