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

Subversion Repositories openrisc

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

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" }
3
 
4
! PR fortran/45197
5
! Check for errors with IMPURE.
6
 
7
! Contributed by Daniel Kraft, d@domob.eu.
8
 
9
MODULE m
10
  IMPLICIT NONE
11
 
12
CONTAINS
13
 
14
  IMPURE PURE SUBROUTINE foobar () ! { dg-error "must not appear both" }
15
 
16
  PURE ELEMENTAL IMPURE FUNCTION xyz () ! { dg-error "must not appear both" }
17
 
18
  IMPURE ELEMENTAL SUBROUTINE mysub ()
19
  END SUBROUTINE mysub
20
 
21
  PURE SUBROUTINE purified ()
22
    CALL mysub () ! { dg-error "is not PURE" }
23
  END SUBROUTINE purified
24
 
25
END MODULE m
26
 
27
! { dg-final { cleanup-modules "m" } }

powered by: WebSVN 2.1.0

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