From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9526 invoked by alias); 11 Feb 2013 12:37:06 -0000 Received: (qmail 6715 invoked by uid 48); 11 Feb 2013 12:36:46 -0000 From: "janus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56284] [OOP] ICE with alternate return in type-bound procedure Date: Mon, 11 Feb 2013 12:37: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: ice-on-valid-code 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: Status AssignedTo 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" 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: 2013-02/txt/msg01060.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56284 janus at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|unassigned at gcc dot |janus at gcc dot gnu.org |gnu.org | --- Comment #5 from janus at gcc dot gnu.org 2013-02-11 12:36:46 UTC --- ... and this adds a warning about the obsolescent alternate return argument (with -std=f2003 or f2008): Index: gcc/fortran/decl.c =================================================================== --- gcc/fortran/decl.c (revision 195915) +++ gcc/fortran/decl.c (working copy) @@ -4487,7 +4487,15 @@ gfc_match_formal_arglist (gfc_symbol *progname, in for (;;) { if (gfc_match_char ('*') == MATCH_YES) - sym = NULL; + { + sym = NULL; + if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate return argument " + "at %C") == FAILURE) + { + m = MATCH_ERROR; + goto cleanup; + } + } else { m = gfc_match_name (name); Also: Mine.