From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21352 invoked by alias); 6 Oct 2009 17:56:06 -0000 Received: (qmail 21155 invoked by uid 48); 6 Oct 2009 17:55:49 -0000 Date: Tue, 06 Oct 2009 17:56:00 -0000 Message-ID: <20091006175549.21154.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/41603] [-fwhole-file] Add diagnostic for assumed-length character function 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-10/txt/msg00529.txt.bz2 ------- Comment #4 from burnus at gcc dot gnu dot org 2009-10-06 17:55 ------- (In reply to comment #2) > c) "If an explicit specific interface is specified by an interface body or a > procedure declaration statement (12.3.2.3) for an external procedure, the > characteristics shall be consistent with those specified in the procedure > definition Richard Main thinks that this disallows it: 'The special rule for assumed length says that this characteristic has to be different, but this requirement says that the characteristic has to be "consistent." I do wish that were defined better, but from context hints I'd interpret "consistent" to mean "the same" for yes/no characteristics like assumed character length. If one tried to interpret "consistent" differently here, I'd wonder why that same interpretation wouldn't apply to the purity matter cited as an exception. 'I suppose there is some ground for uncertainly here based on the question of exactly how "consistent" is interpreted.' I still do not quite see why it is allowed for implicit interfaces, but somehow the following seems to allow it: "If a type is specified for an external function, its function definition (12.5.2.1) shall specify the same result type and type parameters." (If it weren't allowed then one could not use it at all. And as it is a legacy item, it must work without explicit interfaces which only exists since F90.) Cf. http://groups.google.com/group/comp.lang.fortran/msg/3ea113a7b45471e5 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41603