Hi Steve, I can generate such a test but it will have to wait until I have finished doing all my Christmas cards :-)
As for the dead code, that is not what is intended and might explain some difficulties that I have had with the code in decl.c. Cheers Paul On 9 December 2017 at 16:21, Steve Kargl <s...@troutmask.apl.washington.edu> wrote: > On Sat, Dec 09, 2017 at 09:09:14AM +0000, Paul Richard Thomas wrote: >> >> This is good for trunk with one proviso: >> >> This should mutate from: >> - /* TODO understand why this error does not appear but, instead, >> - the derived type is caught as a variable in primary.c. */ >> - if (gfc_spec_list_type (type_param_spec_list, NULL) != SPEC_EXPLICIT) >> { >> - gfc_error ("The type parameter spec list in the type-spec at " >> - "%L cannot contain ASSUMED or DEFERRED parameters", >> - &old_locus); >> - goto cleanup; >> >> to (ignoring lhs white space and tabs): >> if (type_param_spec_list >> && gfc_spec_list_type (type_param_spec_list, NULL) == SPEC_DEFERRED) >> { >> gfc_error ("The type parameter spec list in the type-spec at " >> %L cannot contain DEFERRED parameters", &old_locus); >> goto cleanup; >> } >> >> which retains the appropriate error for PDTs. >> > > OK. Do you have a test that triggers this error > sitting in your next round of PDT changes? My > regression testing did not bulk at the removal > of the code. > > BTW, is this code correct? > > bool > gfc_insert_parameter_exprs (gfc_expr *e, gfc_actual_arglist *param_list) > { > gfc_actual_arglist *old_param_spec_list = type_param_spec_list; > type_param_spec_list = param_list; > return gfc_traverse_expr (e, NULL, &insert_parameter_exprs, 1); > type_param_spec_list = NULL; > type_param_spec_list = old_param_spec_list; > } > > The last 2 line are never reached? > > -- > Steve -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein