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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [block_1.f08] - Blame information for rev 302

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do run }
2
! { dg-options "-std=f2008 -fall-intrinsics" }
3
 
4
! Basic Fortran 2008 BLOCK construct test.
5
 
6
PROGRAM main
7
  IMPLICIT NONE
8
  INTEGER :: i
9
 
10
  i = 42
11
 
12
  ! Empty block.
13
  BLOCK
14
  END BLOCK
15
 
16
  ! Block without local variables but name.
17
  BLOCK
18
    IF (i /= 42) CALL abort ()
19
    i = 5
20
  END BLOCK
21
  IF (i /= 5) CALL abort ()
22
 
23
  ! Named block with local variable and nested block.
24
  myblock: BLOCK
25
    INTEGER :: i
26
    i = -1
27
    BLOCK
28
      IF (i /= -1) CALL abort ()
29
      i = -2
30
    END BLOCK
31
    IF (i /= -2) CALL abort ()
32
  END BLOCK myblock ! Matching end-label.
33
  IF (i /= 5) CALL abort ()
34
END PROGRAM main

powered by: WebSVN 2.1.0

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