When I compile the module listed below I get the following message: k.f90:5.13: CALL sub2 1 Error: PROCEDURE attribute conflicts with DIMENSION attribute in 'sub2' at (1) It resembles Bug 24633. However, g95 and Lahey regard 24633 as an error but do not regard this as an error. MODULE ksbin2_aux_mod REAL, DIMENSION(1) :: sub2 CONTAINS SUBROUTINE sub1 CALL sub2 CONTAINS SUBROUTINE sub2 END SUBROUTINE sub2 END SUBROUTINE sub1 END MODULE ksbin2_aux_mod
Confirmed > > It resembles Bug 24633. However, g95 and Lahey regard 24633 as an error but do > not regard this as an error. In actual fact, it is the same as pr30746. Both make wrong host associations, when doubly contained procedures are at play. gfortran and, to some degree, g95 deny the possibility of such a thing:) I have been thinking about how best to fix pr30746 and will add this one to my reflections. Thanks for the report. Paul
(In reply to comment #1) > I have been thinking about how best to fix pr30746 and will add this one to my > reflections. I fixed 30746 but this PR remains. It is, if anything, a bit more difficult because there is at least one further error behind the one that you report. *sigh* Paul
Subject: Bug number PR31494 A patch for this bug has been added to the patch tracker. The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2007-06/msg01812.html
I'd better take this on since I have had my patch for it accepted! Thanks for the report, Michael. Paul
Subject: Bug 31494 Author: pault Date: Mon Jun 25 18:27:59 2007 New Revision: 126000 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126000 Log: 2007-06-25 Paul Thomas <pault@gcc.gnu.org> PR fortran/32464 * resolve.c (check_host_association): Return if the old symbol is use associated. Introduce retval to reduce the number of evaluations of the first-order return value. PR fortran/31494 * match.c (gfc_match_call): If a host associated symbol is not a subroutine, build a new symtree/symbol in the current name space. 2007-06-25 Paul Thomas <pault@gcc.gnu.org> PR fortran/32464 * gfortran.dg/host_assoc_function_2.f90: New test. PR fortran/31494 * gfortran.dg/host_assoc_call_1.f90: New test. Added: trunk/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90 trunk/gcc/testsuite/gfortran.dg/host_assoc_function_2.f90 Modified: trunk/gcc/fortran/ChangeLog trunk/gcc/fortran/match.c trunk/gcc/fortran/resolve.c trunk/gcc/testsuite/ChangeLog
Fixed on trunk. Paul