From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1203 invoked by alias); 12 Mar 2007 08:51:05 -0000 Received: (qmail 1160 invoked by uid 48); 12 Mar 2007 08:50:51 -0000 Date: Mon, 12 Mar 2007 08:51:00 -0000 Message-ID: <20070312085051.1159.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/30922] IMPORT fails for same symbol in multiple interface bodies of same interface block In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "burnus at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-03/txt/msg01040.txt.bz2 ------- Comment #3 from burnus at gcc dot gnu dot org 2007-03-12 08:50 ------- Created an attachment (id=13193) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13193&action=view) Patch draft (by Paul Thomas) Notes by Paul: ---------------- (i) gfc_find_symbol searches via proc_name->ns to overcome standard problem with interfaces in enclosed procedures. (ii) Add field imported to gfc_symtree (iii) Set it when a symbol is imported (iv)resolve.c 5658 to use imported to stop false error for individually imported symbols. ---------------- Note, it does not fix the problem of comment 1 (which was found later). It causes some regressions (filelist below) with such errors: gfortran.fortran-torture/execute/der_io.f90:55.20: subroutine foo(t) 1 gfortran.fortran-torture/execute/der_io.f90:5.15: type xyz_type 2 Error: The type xyz_type cannot be host associated at (1) because it is blocked by an incompatible object of the same name at (2) Files: gfortran.dg/automatic_default_init_1.f90 gfortran.dg/char_result_11.f90 gfortran.dg/char_result_5.f90 gfortran.dg/char_result_6.f90 gfortran.dg/default_initialization_2.f90 gfortran.dg/dependency_19.f90 gfortran.dg/der_charlen_1.f90 gfortran.dg/der_io_2.f90 gfortran.dg/der_io_3.f90 gfortran.dg/der_pointer_3.f90 [...] -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30922