aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/allocatable_function_2.f90
blob: ab26c2a04580a773f4ba1f6bd0ec44ebc19ca988 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
! { dg-do compile }
! Test constraints on ALLOCATABLE functions
program alloc_fun

contains

    elemental function foo (n)
        integer, intent(in) :: n
        integer, allocatable :: foo(:) ! { dg-error "ALLOCATABLE .* ELEMENTAL" }
    end function foo

end program alloc_fun