From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34615 invoked by alias); 25 Sep 2015 21:41:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 34595 invoked by uid 89); 25 Sep 2015 21:41:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.3 required=5.0 tests=AWL,BAYES_50,KAM_ASCII_DIVIDERS,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 X-Spam-User: qpsmtpd, 2 recipients X-HELO: troutmask.apl.washington.edu Received: from troutmask.apl.washington.edu (HELO troutmask.apl.washington.edu) (128.95.76.21) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 25 Sep 2015 21:41:33 +0000 Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.15.2/8.15.2) with ESMTPS id t8PLfUKU019603 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 25 Sep 2015 14:41:30 -0700 (PDT) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.15.2/8.15.2/Submit) id t8PLfTBS019602; Fri, 25 Sep 2015 14:41:29 -0700 (PDT) (envelope-from sgk) Date: Sat, 26 Sep 2015 05:41:00 -0000 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] fortran/67616 -- Fix ICE within a BLOCK construct Message-ID: <20150925214129.GA19593@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q" Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2015-09/txt/msg02036.txt.bz2 --ikeVEW9yuYc//A+q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 546 The attached patch has been built and regression tested on x86_64-*-freebsd. No regression occurred. The patch removes a conditional within an assert() that triggers when a BLOCK construct is encountered. OK to commit? 2015-09-25 Steven G. Kargl PR fortran/67616 * primary.c (gfc_match_structure_constructor): Remove a condition in an assert() that is not valid within a BLOCK-END BLOCK construct. 2015-09-25 Steven G. Kargl PR fortran/67616 * gfortran.dg/pr67616.f90: New test. -- Steve --ikeVEW9yuYc//A+q Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="pr67616.diff" Content-length: 1018 Index: fortran/primary.c =================================================================== --- fortran/primary.c (revision 228061) +++ fortran/primary.c (working copy) @@ -2703,8 +2703,7 @@ gfc_match_structure_constructor (gfc_sym e->symtree = symtree; e->expr_type = EXPR_FUNCTION; - gcc_assert (sym->attr.flavor == FL_DERIVED - && symtree->n.sym->attr.flavor == FL_PROCEDURE); + gcc_assert (sym->attr.flavor == FL_DERIVED); e->value.function.esym = sym; e->symtree->n.sym->attr.generic = 1; Index: testsuite/gfortran.dg/pr67616.f90 =================================================================== --- testsuite/gfortran.dg/pr67616.f90 (revision 0) +++ testsuite/gfortran.dg/pr67616.f90 (working copy) @@ -0,0 +1,13 @@ +! { dg-do compile } +! PR fortran/67616 +! Original code contributed by Gerhard Steinmetz +program p + type t + end type + type(t) :: y + data y /t()/ + block + type(t) :: x + data x /t()/ ! Prior to patch, this would ICE. + end block +end --ikeVEW9yuYc//A+q--