OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [volatile3.f90] - Blame information for rev 713

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-shouldfail "Invalid use of VOLATILE" }
3
! Test whether volatile statements and attributes are
4
! properly error checked.
5
! PR fortran/29601
6
program volatile_test
7
  implicit none
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" }
11
  real :: l,m
12
  real,volatile :: n
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" }
17
  l = 4.0
18
  m = 3.0
19
contains
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\\)" }
22
  end subroutine
23
end program volatile_test

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.