diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/allocatable_function_2.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/allocatable_function_2.f90 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/allocatable_function_2.f90 b/gcc/testsuite/gfortran.dg/allocatable_function_2.f90 new file mode 100644 index 000000000..ab26c2a04 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/allocatable_function_2.f90 @@ -0,0 +1,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 |