Re: [patch, fortran] Fix PR 85102, take 2

2018-04-02 Thread Thomas König
Hi Steve, else gfc_free_expr (n); Don't you need the above changes to avoid leaking memory? Correct. OK with those changes? Regards Thomas

Re: [patch, fortran] Fix PR 85102, take 2

2018-04-02 Thread Steve Kargl
On Mon, Apr 02, 2018 at 02:05:29PM +0200, Thomas König wrote: > + if (as->type == AS_EXPLICIT) > + { > + for (int i = 0; i < as->rank; i++) > + { > + gfc_expr *e, *n; > + e = as->lower[i]; > + if (e->expr_type != EXPR_CONSTANT) > + {

[patch, fortran] Fix PR 85102, take 2

2018-04-02 Thread Thomas König
Hello world, here is the second version of the fix for PR 85102. This is a much more general approach, which actually uses simplification (while avoiding some "interesting" regressions when resolving, or simplifying, too soon...) Thanks to Dominique for the hint about the problem with my first p

Re: [patch, fortran] Fix PR 85102

2018-04-01 Thread Thomas Koenig
Hi everybody, Regression-tested. OK for trunk? Not OK, since it misses integer, parameter :: a((1+1)+1) = 1 as asked by Dominique on IRC. Good catch! I'll look at this tomorrow. Regards thomas

[patch, fortran] Fix PR 85102

2018-04-01 Thread Thomas Koenig
Hello world, this is a minimal-invasive patch to fix the case where array specs starting with a parenthesis were not handled correctly. Regression-tested. OK for trunk? Regards Thomas 2018-04-01 Thomas Koenig PR fortran/85102 * array.c (strip_parens): New function.