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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [pure_initializer_1.f90] - Rev 694

Compare with Previous | Blame | View Log

! { dg-do compile }
! Tests the fix for PR32881, in which the initialization
! of 'p' generated an error because the pureness of 'bar'
! escaped.
!
! Contributed by Janne Blomqvist <jb@gcc.gnu.org>
!
subroutine foo ()
  integer, pointer :: p => NULL()
contains
  pure function bar (a)
    integer, intent(in) :: a
    integer :: bar
    bar = a
  end function bar
end subroutine foo

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.