Message ID | 9b07530f-b767-8cc7-48fa-067045034678@netcologne.de |
---|---|
State | New |
Headers | show |
I wrote:
> Regression-testing as I write this. OK for trunk if it passes?
Regression test passed.
Regards
Thomas
Am 24.07.2017 um 23:27 schrieb Thomas Koenig: > Hello world, > > the attached patch fixes the PR; patch and test case are rather > self-explanatory. > > Regression-testing as I write this. OK for trunk if it passes? > > Regards > > Thomas OK? Regards Thomas
Hi Thomas, This is 'obvious, I think. Yes, OK for trunk. Thanks Paul On 1 August 2017 at 16:09, Thomas Koenig <tkoenig@netcologne.de> wrote: > Am 24.07.2017 um 23:27 schrieb Thomas Koenig: >> >> Hello world, >> >> the attached patch fixes the PR; patch and test case are rather >> self-explanatory. >> >> Regression-testing as I write this. OK for trunk if it passes? >> >> Regards >> >> Thomas > > > OK? > > Regards > > Thomas
Index: intrinsic.c =================================================================== --- intrinsic.c (Revision 249936) +++ intrinsic.c (Arbeitskopie) @@ -4919,9 +4919,11 @@ gfc_convert_type_warn (gfc_expr *expr, gfc_typespe if (ts->type == BT_UNKNOWN) goto bad; - /* NULL and zero size arrays get their type here. */ - if (expr->expr_type == EXPR_NULL - || (expr->expr_type == EXPR_ARRAY && expr->value.constructor == NULL)) + /* NULL and zero size arrays get their type here, unless they already have a + typespec. */ + if ((expr->expr_type == EXPR_NULL + || (expr->expr_type == EXPR_ARRAY && expr->value.constructor == NULL)) + && expr->ts.type == BT_UNKNOWN) { /* Sometimes the RHS acquire the type. */ expr->ts = *ts;