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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gfortran.dg/] [pure_initializer_1.f90] - Blame information for rev 307

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

Line No. Rev Author Line
1 302 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR32881, in which the initialization
3
! of 'p' generated an error because the pureness of 'bar'
4
! escaped.
5
!
6
! Contributed by Janne Blomqvist 
7
!
8
subroutine foo ()
9
  integer, pointer :: p => NULL()
10
contains
11
  pure function bar (a)
12
    integer, intent(in) :: a
13
    integer :: bar
14
    bar = a
15
  end function bar
16
end subroutine foo
17
 

powered by: WebSVN 2.1.0

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