http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50227
--- Comment #11 from janus at gcc dot gnu.org 2011-08-29 19:28:42 UTC --- Well, the obvious patch (based on Tobias' debugging) would be: Index: gcc/fortran/trans-types.c =================================================================== --- gcc/fortran/trans-types.c (revision 178253) +++ gcc/fortran/trans-types.c (working copy) @@ -2109,7 +2109,8 @@ gfc_sym_type (gfc_symbol * sym) { /* We must use pointer types for potentially absent variables. The optimizers assume a reference type argument is never NULL. */ - if (sym->attr.optional || sym->ns->proc_name->attr.entry_master) + if (sym->attr.optional + || (sym->ns->proc_name && sym->ns->proc_name->attr.entry_master)) type = build_pointer_type (type); else { And indeed it seems to fix the segfault. However, I still don't really see the connection to r171654.