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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [allocatable_dummy_3.f90] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
! { dg-do run }
2
! PR 28416: Check that allocatable dummies can be passed onwards as non-assumed
3
! shape arg.
4
program main
5
 
6
    implicit none
7
    integer, allocatable :: a(:)
8
 
9
    interface
10
        subroutine foo(v_out)
11
            integer, allocatable :: v_out(:)
12
        end subroutine foo
13
    end interface
14
 
15
    call foo(a)
16
    if (any(a /= [ 1, 2, 3 ])) call abort()
17
 
18
end program
19
 
20
 
21
subroutine foo(v_out)
22
    implicit none
23
    integer, allocatable :: v_out(:)
24
 
25
    allocate(v_out(3))
26
    call bar(v_out, size(v_out))
27
end subroutine foo
28
 
29
 
30
subroutine bar(v, N)
31
    implicit none
32
    integer :: N
33
    integer :: v(N)
34
    integer :: i
35
 
36
    do i = 1, N
37
        v(i) = i
38
    end do
39
end subroutine bar

powered by: WebSVN 2.1.0

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