Re: [Patch fortran] PR 68567 - ICE on using wrong defined arrays (different cases/messages)
Thanks for the quick answer. Committed as revision r270137. Dominique > Le 3 avr. 2019 à 21:15, Steve Kargl a > écrit : > > On Wed, Apr 03, 2019 at 05:01:42PM +0200, Dominique d'Humières wrote: >> Hi Steve, >> >> Do you agree with the following packaging of your patch for pr68567? >> > > I honestly don't remember why I did not submit the patch to the list. > If it fixes the bug and regression tests cleanly, then I won't object > to committing the patch. > > -- > Steve
Re: [Patch fortran] PR 68567 - ICE on using wrong defined arrays (different cases/messages)
On Wed, Apr 03, 2019 at 05:01:42PM +0200, Dominique d'Humières wrote: > Hi Steve, > > Do you agree with the following packaging of your patch for pr68567? > I honestly don't remember why I did not submit the patch to the list. If it fixes the bug and regression tests cleanly, then I won't object to committing the patch. -- Steve
[Patch fortran] PR 68567 - ICE on using wrong defined arrays (different cases/messages)
Hi Steve, Do you agree with the following packaging of your patch for pr68567? 2019-04-03 Steven G. Kargl PR fortran/68567 * expr.c (gfc_reduce_init_expr): Add extra check to avoid dereferencing a null pointer. 2019-04-03 Dominique d'Humieres PR fortran/68567 * gfortran.dg/parameter_array_error_1.f90: New test. --- ../_clean/gcc/fortran/expr.c2019-04-03 11:00:55.0 +0200 +++ gcc/fortran/expr.c 2019-04-02 20:55:20.0 +0200 @@ -3003,7 +3003,7 @@ gfc_reduce_init_expr (gfc_expr *expr) t = gfc_check_init_expr (expr); gfc_init_expr_flag = false; - if (!t) + if (!t || !expr) return false; if (expr->expr_type == EXPR_ARRAY) ! { dg-do compile } ! PR68567 ! Contributed by Gerhard Steinmetz ! program p integer, parameter :: a(:) = [2, 1] ! { dg-error "cannot be automatic or of deferred shape" } end Tested on darwin for more than two years. TIA Dominique