http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47054
--- Comment #5 from kargl at gcc dot gnu.org 2011-01-03 23:58:41 UTC --- The problem appears to be in decl.c(variable_decl) /* If this symbol has already shown up in a Cray Pointer declaration, then we want to set the type & bail out. */ if (gfc_option.flag_cray_pointer) { gfc_find_symbol (name, gfc_current_ns, 1, &sym); if (sym != NULL && sym->attr.cray_pointee) { sym->ts.type = current_ts.type; sym->ts.kind = current_ts.kind; When gfc_find_symbol() returns, sym == NULL, so the if block is skipped. current_ts.type is BT_REAL and for the reduced testcase current_ts.kind = 4, which is want we want. I think we may want to have a if (sym == NULL && sym->attr.cray_pointee) insert_name_into_current_namespace. Unfortnately, I can't remember how to do that and have no time to investigate further.