From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16059 invoked by alias); 15 Sep 2013 11:30:24 -0000 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 Received: (qmail 16010 invoked by uid 48); 15 Sep 2013 11:30:18 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/58355] [F03] ICE with TYPE, EXTENDS before parent TYPE defined Date: Sun, 15 Sep 2013 11:30: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-Version: 4.9.0 X-Bugzilla-Keywords: ice-on-invalid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: janus at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords bug_status cf_reconfirmed_on cc short_desc everconfirmed Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-09/txt/msg01084.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58355 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |ice-on-invalid-code Status|UNCONFIRMED |NEW Last reconfirmed| |2013-09-15 CC| |janus at gcc dot gnu.org Summary|ICE with TYPE, EXTENDS |[F03] ICE with TYPE, |before parent TYPE defined |EXTENDS before parent TYPE | |defined Ever confirmed|0 |1 --- Comment #1 from janus at gcc dot gnu.org --- Confirmed with 4.7, 4.8 and trunk. Slightly reduced test case: module ct public :: t1 type, extends(t1) :: t2 end type type :: t1 end type end It seems to be invalid according to C428 in F08: R427 type-attr-spec is ABSTRACT or access-spec or BIND (C) or EXTENDS ( parent-type-name ) C428 (R427) A parent-type-name shall be the name of a previously defined extensible type (4.5.7). Btw, leaving out the PUBLIC statement, one gets this error: type, extends(t1) :: t2 1 Error: No such symbol in TYPE definition at (1) ... which is in principle correct, but a bit ill-worded. Both variants should be rejected with the same (improved) wording.