Hello Mikael, Mikael Morin wrote:
Regression tested on x86_64-unknown-linux-gnu. OK for 4.7/4.6/4.5[/4.4] ?
OK - thanks for the comprehensive patch explanation and for the patch itself.
+ else + { + /* Otherwise, evaluate the argument out of the loop and pass + a reference to the value. */ + gfc_conv_expr (&se, expr);
s/out of/outside/
+ if (dummy_arg != NULL + && dummy_arg->sym->attr.optional + && arg->expr + && arg->expr->symtree + && arg->expr->symtree->n.sym->attr.optional + && arg->expr->ref == NULL) + newss->info->data.scalar.can_be_null_ref = true;
I wonder whether one needs to take special care for the following Fortran 2008 feature: "A null pointer can be used to denote an absent nonallocatable nonpoin-
ter optional argument." - I guess, one doesn't. Tobias