This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR fortran/36192 -- Check for valid BT_INTEGER


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]