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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [allocatable_function_3.f90] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
! { dg-do run }
2
! Tests the fix for PR33986, in which the call to scram would call
3
! an ICE because allocatable result actuals had not been catered for.
4
!
5
!  Contributed by Damian Rouson 
6
!
7
function transform_to_spectral_from() result(spectral)
8
  integer, allocatable :: spectral(:)
9
  allocate(spectral(2))
10
  call scram(spectral)
11
end function transform_to_spectral_from
12
 
13
subroutine scram (x)
14
  integer x(2)
15
  x = (/1,2/)
16
end subroutine
17
 
18
  interface
19
    function transform_to_spectral_from() result(spectral)
20
      integer, allocatable :: spectral(:)
21
    end function transform_to_spectral_from
22
  end interface
23
  if (any (transform_to_spectral_from () .ne. (/1,2/))) call abort ()
24
end

powered by: WebSVN 2.1.0

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