From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1433 invoked by alias); 7 Oct 2009 21:59:07 -0000 Received: (qmail 1391 invoked by uid 48); 7 Oct 2009 21:58:53 -0000 Date: Wed, 07 Oct 2009 21:59:00 -0000 Message-ID: <20091007215853.1390.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug fortran/41608] ICE with CLASS and invalid code In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "janus 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/msg00641.txt.bz2 ------- Comment #1 from janus at gcc dot gnu dot org 2009-10-07 21:58 ------- The fix: Index: gcc/fortran/decl.c =================================================================== --- gcc/fortran/decl.c (Revision 152525) +++ gcc/fortran/decl.c (Arbeitskopie) @@ -3751,7 +3751,8 @@ gfc_match_data_decl (void) if (m != MATCH_YES) return m; - if (current_ts.type == BT_DERIVED && gfc_current_state () != COMP_DERIVED) + if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS) + && gfc_current_state () != COMP_DERIVED) { sym = gfc_use_derived (current_ts.u.derived); @@ -3771,7 +3772,8 @@ gfc_match_data_decl (void) goto cleanup; } - if (current_ts.type == BT_DERIVED && current_ts.u.derived->components == NULL + if ((current_ts.type == BT_DERIVED || current_ts.type == BT_CLASS) + && current_ts.u.derived->components == NULL && !current_ts.u.derived->attr.zero_comp) { -- janus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2009-10-07 21:58:53 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41608