public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Steve Kargl <sgk@troutmask.apl.washington.edu>
To: FX <fxcoudert@gmail.com>
Cc: fortran@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER
Date: Mon, 26 Oct 2015 13:46:00 -0000	[thread overview]
Message-ID: <20151026134604.GA37294@troutmask.apl.washington.edu> (raw)
In-Reply-To: <09CB262E-8C71-457F-9F0C-0B6097D9C690@gmail.com>

On Mon, Oct 26, 2015 at 09:49:10AM +0100, FX wrote:
> > 2015-10-25  Steven G. Kargl  <kargl@gcc.gnu.org>
> > 
> > 	PR fortran/36192
> > 	* array.c (gfc_ref_dimen_size): Check for BT_INTEGER before calling
> > 	mpz_set.
> > 
> > 
> > 2015-10-25  Steven G. Kargl  <kargl@gcc.gnu.org>
> > 
> > 	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

  reply	other threads:[~2015-10-26 13:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-26  1:16 Steve Kargl
2015-10-26  8:49 ` FX
2015-10-26 13:46   ` Steve Kargl [this message]
2015-10-26 14:43     ` FX
2015-10-26 16:12       ` Steve Kargl
2015-10-26 10:15 Dominique d'Humières
2015-10-26 16:29 ` Dominique d'Humières

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151026134604.GA37294@troutmask.apl.washington.edu \
    --to=sgk@troutmask.apl.washington.edu \
    --cc=fortran@gcc.gnu.org \
    --cc=fxcoudert@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).