[PATCH] PR fortran/36192 -- Check for valid BT_INTEGER
Steve Kargl
sgk@troutmask.apl.washington.edu
Mon Oct 26 13:46:00 GMT 2015
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
More information about the Fortran
mailing list