Message ID | 590B4819.3060503@gmx.de |
---|---|
State | New |
Headers | show |
On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: > While trying to clean up my working copy, I found that the trivial > patch for the ICE-on-invalid as described in the PR regtests cleanly > for 7-release on i686-pc-linux-gnu. > > Here's the cleaned-up version (diffs attached). > > 2017-05-04 Harald Anlauf <anlauf@gmx.de> > > PR fortran/70071 > * array.c (gfc_ref_dimen_size): Handle bad subscript triplets. > > 2017-05-04 Harald Anlauf <anlauf@gmx.de> > > PR fortran/70071 > * gfortran.dg/coarray_44.f90: New testcase. > Harald, The patch looks reasonable. Do you have a commit privilege?
On 05/04/17 18:15, Steve Kargl wrote: > On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: >> While trying to clean up my working copy, I found that the trivial >> patch for the ICE-on-invalid as described in the PR regtests cleanly >> for 7-release on i686-pc-linux-gnu. >> >> Here's the cleaned-up version (diffs attached). >> >> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >> >> PR fortran/70071 >> * array.c (gfc_ref_dimen_size): Handle bad subscript triplets. >> >> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >> >> PR fortran/70071 >> * gfortran.dg/coarray_44.f90: New testcase. >> > > Harald, > > The patch looks reasonable. Do you have a commit privilege? > Steve, no, I don't. Would you like to take care of the patch? Then please do so. Thanks, Harald
The patch below has not been applied to the best of my knowledge. Just a reminder for whoever cares. Harald On 05/04/17 20:19, Harald Anlauf wrote: > On 05/04/17 18:15, Steve Kargl wrote: >> On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: >>> While trying to clean up my working copy, I found that the trivial >>> patch for the ICE-on-invalid as described in the PR regtests cleanly >>> for 7-release on i686-pc-linux-gnu. >>> >>> Here's the cleaned-up version (diffs attached). >>> >>> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >>> >>> PR fortran/70071 >>> * array.c (gfc_ref_dimen_size): Handle bad subscript triplets. >>> >>> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >>> >>> PR fortran/70071 >>> * gfortran.dg/coarray_44.f90: New testcase. >>> >> >> Harald, >> >> The patch looks reasonable. Do you have a commit privilege? >> > > Steve, > > no, I don't. > > Would you like to take care of the patch? Then please do so. > > Thanks, > Harald >
Hi Harald, thanks for the reminder. I can take care of committing the patch for you. Just give me a day or two ... Cheers, Janus 2017-07-05 20:44 GMT+02:00 Harald Anlauf <anlauf@gmx.de>: > The patch below has not been applied to the best of my knowledge. > > Just a reminder for whoever cares. > > Harald > > On 05/04/17 20:19, Harald Anlauf wrote: >> On 05/04/17 18:15, Steve Kargl wrote: >>> On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: >>>> While trying to clean up my working copy, I found that the trivial >>>> patch for the ICE-on-invalid as described in the PR regtests cleanly >>>> for 7-release on i686-pc-linux-gnu. >>>> >>>> Here's the cleaned-up version (diffs attached). >>>> >>>> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >>>> >>>> PR fortran/70071 >>>> * array.c (gfc_ref_dimen_size): Handle bad subscript triplets. >>>> >>>> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >>>> >>>> PR fortran/70071 >>>> * gfortran.dg/coarray_44.f90: New testcase. >>>> >>> >>> Harald, >>> >>> The patch looks reasonable. Do you have a commit privilege? >>> >> >> Steve, >> >> no, I don't. >> >> Would you like to take care of the patch? Then please do so. >> >> Thanks, >> Harald >> >
Applied to trunk as r250039. Thanks for the patch! Cheers, Janus 2017-07-05 22:03 GMT+02:00 Janus Weil <janus@gcc.gnu.org>: > Hi Harald, > > thanks for the reminder. I can take care of committing the patch for > you. Just give me a day or two ... > > Cheers, > Janus > > > > 2017-07-05 20:44 GMT+02:00 Harald Anlauf <anlauf@gmx.de>: >> The patch below has not been applied to the best of my knowledge. >> >> Just a reminder for whoever cares. >> >> Harald >> >> On 05/04/17 20:19, Harald Anlauf wrote: >>> On 05/04/17 18:15, Steve Kargl wrote: >>>> On Thu, May 04, 2017 at 05:26:17PM +0200, Harald Anlauf wrote: >>>>> While trying to clean up my working copy, I found that the trivial >>>>> patch for the ICE-on-invalid as described in the PR regtests cleanly >>>>> for 7-release on i686-pc-linux-gnu. >>>>> >>>>> Here's the cleaned-up version (diffs attached). >>>>> >>>>> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >>>>> >>>>> PR fortran/70071 >>>>> * array.c (gfc_ref_dimen_size): Handle bad subscript triplets. >>>>> >>>>> 2017-05-04 Harald Anlauf <anlauf@gmx.de> >>>>> >>>>> PR fortran/70071 >>>>> * gfortran.dg/coarray_44.f90: New testcase. >>>>> >>>> >>>> Harald, >>>> >>>> The patch looks reasonable. Do you have a commit privilege? >>>> >>> >>> Steve, >>> >>> no, I don't. >>> >>> Would you like to take care of the patch? Then please do so. >>> >>> Thanks, >>> Harald >>> >>
Index: gcc/fortran/array.c =================================================================== --- gcc/fortran/array.c (revision 247015) +++ gcc/fortran/array.c (working copy) @@ -2202,9 +2202,15 @@ gfc_ref_dimen_size (gfc_array_ref *ar, int dimen, mpz_t diff; bool t; - if (dimen < 0 || ar == NULL || dimen > ar->dimen - 1) + if (dimen < 0 || ar == NULL) gfc_internal_error ("gfc_ref_dimen_size(): Bad dimension"); + if (dimen > ar->dimen - 1) + { + gfc_error ("Bad array dimension at %L", &ar->c_where[dimen]); + return false; + } + switch (ar->dimen_type[dimen]) { case DIMEN_ELEMENT: