diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2008-09-21 19:58:23 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2008-09-21 19:58:23 +0000 |
commit | ecd3b73c6dde9d7b61b811b3cab3ac823b63c181 (patch) | |
tree | b68949529b16170ec70aaa2df94ddaeea09ee265 /gcc/testsuite | |
parent | 19047e4a033c61a38aab9156e2bd49ed0e7bc3e5 (diff) | |
download | gcc-ecd3b73c6dde9d7b61b811b3cab3ac823b63c181.zip gcc-ecd3b73c6dde9d7b61b811b3cab3ac823b63c181.tar.gz gcc-ecd3b73c6dde9d7b61b811b3cab3ac823b63c181.tar.bz2 |
re PR fortran/37583 (ICE "insert_bbt(): Duplicate key" for self-calling ENTRY subprogram)
2008-09-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37583
* decl.c (scalarize_intrinsic_call): Both subroutines and
functions can give a true for get_proc_mame's last argument so
remove the &&gfc_current_ns->proc_name->attr.function.
resolve.c (resolve_actual_arglist): Add check for recursion by
reference to procedure as actual argument.
2008-09-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/37583
* gfortran.dg/entry_18.f90: New test.
From-SVN: r140532
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/entry_18.f90 | 36 |
2 files changed, 41 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 7ffa03a..c1ee1f8 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-09-21 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/37583 + * gfortran.dg/entry_18.f90: New test. + 2008-09-21 Daniel Kraft <d@domob.eu> PR fortran/35846 diff --git a/gcc/testsuite/gfortran.dg/entry_18.f90 b/gcc/testsuite/gfortran.dg/entry_18.f90 new file mode 100644 index 0000000..e00aea7 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/entry_18.f90 @@ -0,0 +1,36 @@ +! { dg-do compile } +! Test fix for PR37583, in which: +! (i) the reference to glocal prior to the ENTRY caused an internal +! error and +! (ii) the need for a RECURSIVE attribute was ignored. +! +! Contributed by Arjen Markus <arjen.markus@wldelft.nl> +! +module gsub +contains +recursive subroutine suba( g ) ! prefix with "RECURSIVE" + interface + real function g(x) + real x + end function + end interface + real :: x, y + call mysub( glocala ) + return +entry glocala( x, y ) + y = x +end subroutine +subroutine subb( g ) + interface + real function g(x) + real x + end function + end interface + real :: x, y + call mysub( glocalb ) ! { dg-error "is recursive" } + return +entry glocalb( x, y ) + y = x +end subroutine +end module +! { dg-final { cleanup-modules "gsub" } } |