From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22938 invoked by alias); 5 Dec 2006 22:02:46 -0000 Received: (qmail 22805 invoked by uid 48); 5 Dec 2006 22:02:36 -0000 Date: Tue, 05 Dec 2006 22:02:00 -0000 Message-ID: <20061205220236.22804.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/30068] Ambigous interfaces not detected In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "pault 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: 2006-12/txt/msg00439.txt.bz2 ------- Comment #2 from pault at gcc dot gnu dot org 2006-12-05 22:02 ------- > Right now, I cannot see why BAD9 does not throw an error - the code in > interface.c looks OK. Ahhh, yes I can. gfc recurses through the formal interfaces of dummy procedures - it actually does it correctly too! Index: gcc/fortran/interface.c =================================================================== *** gcc/fortran/interface.c (revision 119554) --- gcc/fortran/interface.c (working copy) *************** compare_type_rank_if (gfc_symbol * s1, g *** 462,468 **** if (s1->attr.function && compare_type_rank (s1, s2) == 0) return 0; ! return compare_interfaces (s1, s2, 0); /* Recurse! */ } --- 462,468 ---- if (s1->attr.function && compare_type_rank (s1, s2) == 0) return 0; ! return 1; /* Recurse! */ } Fixes the problem and regtests OK. Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30068