From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 95738 invoked by alias); 26 Oct 2015 13:46:10 -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 95684 invoked by uid 89); 26 Oct 2015 13:46:08 -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; Mon, 26 Oct 2015 13:46:07 +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 t9QDk5vb037321 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 26 Oct 2015 06:46:05 -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 t9QDk5pT037320; Mon, 26 Oct 2015 06:46:05 -0700 (PDT) (envelope-from sgk) Date: Mon, 26 Oct 2015 13:48:00 -0000 From: Steve Kargl To: FX Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER Message-ID: <20151026134604.GA37294@troutmask.apl.washington.edu> References: <20151026011639.GA34497@troutmask.apl.washington.edu> <09CB262E-8C71-457F-9F0C-0B6097D9C690@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <09CB262E-8C71-457F-9F0C-0B6097D9C690@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SW-Source: 2015-10/txt/msg02744.txt.bz2 On Mon, Oct 26, 2015 at 09:49:10AM +0100, FX wrote: > > 2015-10-25 Steven G. Kargl > > > > PR fortran/36192 > > * array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling > > mpz_set. > > > > > > 2015-10-25 Steven G. Kargl > > > > PR fortran/36192 > > * gfortran.dg/pr36192.f90: New test. > > OK. But I don???t understand why the testcase???s dg-error pattern has this form: a regex ???or??? (|) of two identical strings? > Because the code issues two errors, one for each dimension. I thought testing for the third (which I prune) to be excessive. laptop-kargl:kargl[202] gfc -c pr36192.f90 pr36192.f90:6:18: real, dimension(n,d) :: x ! { dg-error "of INTEGER type|of INTEGER type" } 1 Error: Expression at (1) must be of INTEGER type, found REAL pr36192.f90:6:20: real, dimension(n,d) :: x ! { dg-error "of INTEGER type|of INTEGER type" } 1 Error: Expression at (1) must be of INTEGER type, found REAL pr36192.f90:6:27: real, dimension(n,d) :: x ! { dg-error "of INTEGER type|of INTEGER type" } 1 Error: The module or main program array 'x' at (1) must have constant shape -- Steve