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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [block_5.f08] - Blame information for rev 774

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

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do compile }
2
! { dg-options "-std=legacy" }
3
! We want to check for statement functions, thus legacy mode.
4
 
5
! Check for errors with declarations not allowed within BLOCK.
6
 
7
SUBROUTINE proc (a)
8
  IMPLICIT NONE
9
  INTEGER :: a
10
 
11
  BLOCK
12
    INTENT(IN) :: a ! { dg-error "not allowed inside of BLOCK" }
13
    VALUE :: a ! { dg-error "not allowed inside of BLOCK" }
14
    OPTIONAL :: a ! { dg-error "not allowed inside of BLOCK" }
15
  END BLOCK
16
END SUBROUTINE proc
17
 
18
PROGRAM main
19
  IMPLICIT NONE
20
 
21
  BLOCK
22
    IMPLICIT INTEGER(a-z) ! { dg-error "not allowed inside of BLOCK" }
23
    INTEGER :: a, b, c, d
24
    INTEGER :: stfunc
25
    stfunc(a, b) = a + b ! { dg-error "not allowed inside of BLOCK" }
26
    EQUIVALENCE (a, b) ! { dg-error "not allowed inside of BLOCK" }
27
    NAMELIST /NLIST/ a, b ! { dg-error "not allowed inside of BLOCK" }
28
    COMMON /CBLOCK/ c, d ! { dg-error "not allowed inside of BLOCK" }
29
  ! This contains is in the specification part.
30
  CONTAINS ! { dg-error "Unexpected CONTAINS statement" }
31
  END BLOCK
32
 
33
  BLOCK
34
    PRINT *, "Hello, world"
35
  ! This one in the executable statement part.
36
  CONTAINS ! { dg-error "Unexpected CONTAINS statement" }
37
  END BLOCK
38
END PROGRAM main

powered by: WebSVN 2.1.0

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