From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10245 invoked by alias); 23 Oct 2015 19:28:18 -0000 Mailing-List: contact fortran-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: fortran-owner@gcc.gnu.org Received: (qmail 10226 invoked by uid 89); 23 Oct 2015 19:28:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,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, 23 Oct 2015 19:28:17 +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 t9NJSEuf066517 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Oct 2015 12:28:14 -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 t9NJSEUe066516; Fri, 23 Oct 2015 12:28:14 -0700 (PDT) (envelope-from sgk) Date: Fri, 23 Oct 2015 19:28:00 -0000 From: Steve Kargl To: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [PATCH] PR fortran/67805 -- Check for invalid charlength Message-ID: <20151023192813.GA66507@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00110.txt.bz2 All, The attached patch fixes several ICEs caused by invalid charlengths. The new testcase pr67805.f90 shows the kinds of issues the patch will detect. An appropriate error message is now issued. Built and regression tested on x86_64-*-freebsd. OK to commit? 2015-10-23 Steven G. Kargl PR fortran/67805 * array.c (gfc_match_array_constructor): Check for error from type spec matching. * decl.c (char_len_param_value): Check for valid of charlen parameter. Reap dead code dating to 2008. match.c (gfc_match_type_spec): Special case the keyword use in REAL. 2015-10-23 Steven G. Kargl PR fortran/67805 * gfortran.dg/pr67805.f90: New testcase. * gfortran.dg/array_constructor_26.f03: Update testcase. * gfortran.dg/array_constructor_27.f03: Ditto. * gfortran.dg/char_type_len_2.f90: Ditto. * gfortran.dg/pr67802.f90: Ditto. * gfortran.dg/used_before_typed_3.f90: Ditto. -- Steve