From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12330 invoked by alias); 7 Apr 2008 22:02:42 -0000 Received: (qmail 12155 invoked by uid 48); 7 Apr 2008 22:01:55 -0000 Date: Mon, 07 Apr 2008 22:02:00 -0000 Message-ID: <20080407220155.12154.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/35830] ICE with PROCEDURE() containing array formal arguments In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "jaydub66 at gmail dot com" 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: 2008-04/txt/msg00563.txt.bz2 ------- Comment #3 from jaydub66 at gmail dot com 2008-04-07 22:01 ------- Another thing I just noticed is that dummy procedures are currently not checked for being called with the right arguments (-> compare_actual_formal), e.g. in the above test case "call f([1,2,3])" could also be called with a different number of arguments like "call f(1,2)" without any error message. In fact this check is currently omitted for any procedure which has the EXTERNAL attribute (which includes all procedures declared via the "PROCEDURE()::" statement). But I guess this check should better be omitted only for procedures which have an implicit interface, right? This can be cured with the following patch: Index: gcc/fortran/interface.c =================================================================== --- gcc/fortran/interface.c (revision 133905) +++ gcc/fortran/interface.c (working copy) @@ -2419,8 +2419,7 @@ gfc_procedure_use (gfc_symbol *sym, gfc_ } } - if (sym->attr.external - || sym->attr.if_source == IFSRC_UNKNOWN) + if (sym->attr.if_source == IFSRC_UNKNOWN) { gfc_actual_arglist *a; for (a = *ap; a; a = a->next) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35830