From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9661 invoked by alias); 10 Sep 2011 11:31:00 -0000 Received: (qmail 9646 invoked by uid 22791); 10 Sep 2011 11:30:59 -0000 X-SWARE-Spam-Status: No, hits=-2.9 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 10 Sep 2011 11:30:45 +0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/47978] [OOP] Invalid INTENT in overriding TBP not detected Date: Sat, 10 Sep 2011 12:32:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: janus at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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: 2011-09/txt/msg00727.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D47978 --- Comment #4 from janus at gcc dot gnu.org 2011-09-10 11:30:21 UTC --- Relevant F08 standard quote: 4.5.7.3 Type-bound procedure overriding 1 If a speci=EF=AC=81c type-bound procedure speci=EF=AC=81ed in a type de= =EF=AC=81nition has the same binding name as a type-bound procedure from the parent type then the binding speci=EF=AC=81ed in the type de=EF=AC=81nition overrides the one from the p= arent type. 2 The overriding and overridden type-bound procedures shall satisfy the following conditions. * Either both shall have a passed-object dummy argument or neither shall. = If the overridden type-bound procedure is pure then the overriding one shall a= lso be pure. * Either both shall be elemental or neither shall. * They shall have the same number of dummy arguments. * Passed-object dummy arguments, if any, shall correspond by name and position. * Dummy arguments that correspond by position shall have the same names and characteristics, except for the type of the passed-object dummy arguments. * Either both shall be subroutines or both shall be functions having the s= ame result characteristics (12.3.3). * If the overridden type-bound procedure is PUBLIC then the overriding one shall not be PRIVATE.