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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [allocatable_dummy_2.f90] - Rev 801

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

! { dg-do compile }
! Check a few constraints for ALLOCATABLE dummy arguments.
program alloc_dummy

    implicit none
    integer :: a(5)

    call init(a) ! { dg-error "must be ALLOCATABLE" }

contains

    subroutine init(x)
        integer, allocatable, intent(out) :: x(:)
    end subroutine init

    subroutine init2(x)
        integer, allocatable, intent(in) :: x(:)

        allocate(x(3)) ! { dg-error "variable definition context" }
    end subroutine init2

    subroutine kill(x)
        integer, allocatable, intent(in) :: x(:)
        
        deallocate(x) ! { dg-error "variable definition context" }
    end subroutine kill

end program alloc_dummy

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

powered by: WebSVN 2.1.0

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