OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [specification_type_resolution_2.f90] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do compile }
2
! Tests the fix for PR30283 in which the type of the result
3
! of bar was getting lost
4
 
5
! Contributed by Harald Anlauf 
6
 
7
module gfcbug50
8
  implicit none
9
contains
10
 
11
  subroutine foo (n, y)
12
    integer, intent(in)         :: n
13
    integer, dimension(bar (n)) :: y
14
    ! Array bound is specification expression, which is allowed (F2003, sect.7.1.6)
15
  end subroutine foo
16
 
17
  pure function bar (n) result (l)
18
    integer, intent(in) :: n
19
    integer             :: l
20
    l = n
21
  end function bar
22
 
23
end module gfcbug50
24
 
25
! { dg-final { cleanup-modules "gfcbug50" } }

powered by: WebSVN 2.1.0

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