From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18748 invoked by alias); 27 May 2009 21:40:40 -0000 Received: (qmail 18704 invoked by uid 48); 27 May 2009 21:40:23 -0000 Date: Wed, 27 May 2009 21:40:00 -0000 Message-ID: <20090527214023.18703.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/40276] Matching GENERIC procedure: Wrong INTENT should give directly an error message 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: 2009-05/txt/msg02163.txt.bz2 ------- Comment #1 from burnus at gcc dot gnu dot org 2009-05-27 21:40 ------- Created an attachment (id=17922) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17922&action=view) Very initial draft patch Some patch; now it prints: call gen(sub) 1 Error: Type/rank mismatch in argument 'a' at (1) Maybe together with the patch which gives better error messages this will produce something useful. Currently it is better than before, but only marginally. I think it should state somewhere that the generic procedure matches a specific one (and only the INTENT goes wrong). I think it should print somewhere the procedure name of the specific function. With all the recursion, having a proper error message is not trivial. I had to remove the intents_check() as it does not do recursive checks. And I could not easily do a a recursive call as then one has two formal arguments rather than a formal and an actual arguments. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40276