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] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }
! { dg-options "-std=f2008" }

! PR fortran/45197
! Check for errors with IMPURE.

! Contributed by Daniel Kraft, d@domob.eu.

MODULE m
  IMPLICIT NONE

CONTAINS

  IMPURE PURE SUBROUTINE foobar () ! { dg-error "must not appear both" }

  PURE ELEMENTAL IMPURE FUNCTION xyz () ! { dg-error "must not appear both" }

  IMPURE ELEMENTAL SUBROUTINE mysub ()
  END SUBROUTINE mysub

  PURE SUBROUTINE purified ()
    CALL mysub () ! { dg-error "is not PURE" }
  END SUBROUTINE purified

END MODULE m

! { dg-final { cleanup-modules "m" } }

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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