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

Subversion Repositories openrisc

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

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=f2008 -fcoarray=single" }
3
 
4
! PR fortran/44602
5
! Check for compile-time errors with non-loop EXITs.
6
 
7
! Contributed by Daniel Kraft, d@domob.eu.
8
 
9
PROGRAM main
10
  IMPLICIT NONE
11
  INTEGER :: bar(2)
12
 
13
  ! Must not exit CRITICAL.
14
  mycrit: CRITICAL
15
    EXIT mycrit ! { dg-error "leaves CRITICAL" }
16
  END CRITICAL mycrit
17
 
18
  ! CYCLE is only allowed for loops!
19
  myblock: BLOCK
20
    CYCLE myblock ! { dg-error "is not applicable to non-loop construct 'myblock'" }
21
  END BLOCK myblock
22
 
23
  ! Invalid construct.
24
  ! Thanks to Mikael Morin, mikael.morin@sfr.fr.
25
  baz: WHERE ([ .true., .true. ])
26
    bar = 0
27
    EXIT baz ! { dg-error "is not applicable to construct 'baz'" }
28
  END WHERE baz
29
END PROGRAM main

powered by: WebSVN 2.1.0

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