Hi All, The original bug is fixed as 'obvious' in revision 257938. This is indeed a regression.
The bug in comments 2 and 7 is fixed in revision 257934. This, however, is not a regression. The summary will be changed accordingly. The 'obvious' tag comes about because both bugs have a common origin: referencing the components of ns->proc_name without testing to see if it is there. Should I close this or should I apply the second part to 7-branch? Cheers Paul >>>>>revision 257938: 2018-02-23 Paul Thomas <pa...@gcc.gnu.org> PR fortran/83149 * trans-types.c (gfc_sym_type): Test sym->ns->proc_name before accessing its components. 2018-02-23 Paul Thomas <pa...@gcc.gnu.org> PR fortran/83149 * gfortran.dg/pr83149_b.f90: New test. * gfortran.dg/pr83149_a.f90: Additional source for previous. >>>>>revision 257934: 2018-02-23 Paul Thomas <pa...@gcc.gnu.org> PR fortran/83149 * trans-decl.c (gfc_finish_var_decl): Test sym->ns->proc_name before accessing its components. 2018-02-23 Paul Thomas <pa...@gcc.gnu.org> PR fortran/83149 * gfortran.dg/pr83149_1.f90: New test. * gfortran.dg/pr83149.f90: Additional source for previous.