This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: FX <fxcoudert at gmail dot com>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 26 Oct 2015 06:46:05 -0700
- Subject: Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER
- Authentication-results: sourceware.org; auth=none
- References: <20151026011639 dot GA34497 at troutmask dot apl dot washington dot edu> <09CB262E-8C71-457F-9F0C-0B6097D9C690 at gmail dot 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