diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/func_decl_3.f90')
-rw-r--r-- | gcc/testsuite/gfortran.dg/func_decl_3.f90 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/func_decl_3.f90 b/gcc/testsuite/gfortran.dg/func_decl_3.f90 new file mode 100644 index 000000000..4e458f47d --- /dev/null +++ b/gcc/testsuite/gfortran.dg/func_decl_3.f90 @@ -0,0 +1,15 @@ +! { dg-do compile } +! Tests the fix for PR24325 in which the lack of any declaration +! that foo is a function or even a procedure was not detected. +! +! Contributed by Jakub Jelinek <jakub@gcc.gnu.org> +! + integer foo + call test +contains + subroutine test + integer :: i + i = foo () ! { dg-error "is not a function" } + end subroutine test +end + |