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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gfortran.dg/] [allocatable_dummy_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
! Check a few constraints for ALLOCATABLE dummy arguments.
3
program alloc_dummy
4
 
5
    implicit none
6
    integer :: a(5)
7
 
8
    call init(a) ! { dg-error "must be ALLOCATABLE" }
9
 
10
contains
11
 
12
    subroutine init(x)
13
        integer, allocatable, intent(out) :: x(:)
14
    end subroutine init
15
 
16
    subroutine init2(x)
17
        integer, allocatable, intent(in) :: x(:)
18
 
19
        allocate(x(3)) ! { dg-error "Can't allocate" }
20
    end subroutine init2
21
 
22
    subroutine kill(x)
23
        integer, allocatable, intent(in) :: x(:)
24
 
25
        deallocate(x) ! { dg-error "Can't deallocate" }
26
    end subroutine kill
27
 
28
end program alloc_dummy

powered by: WebSVN 2.1.0

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