http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50570
--- Comment #8 from janus at gcc dot gnu.org 2011-10-09 23:26:45 UTC --- (In reply to comment #7) > > > > How about this? > > > > > > Looks as if should work (for comment 0). > > > > It does. I'll check for regressions. > > Unfortunately it fails on: > > FAIL: gfortran.dg/pointer_intent_1.f90 -O0 (test for excess errors) > FAIL: gfortran.dg/pointer_intent_3.f90 -O (test for excess errors) > FAIL: gfortran.dg/pointer_intent_4.f90 -O0 (test for excess errors) The following variant avoids these regressions: Index: gcc/fortran/expr.c =================================================================== --- gcc/fortran/expr.c (revision 179729) +++ gcc/fortran/expr.c (working copy) @@ -4635,7 +4635,7 @@ gfc_check_vardef_context (gfc_expr* e, bool pointe sym->name, context, &e->where); return FAILURE; } - if (!pointer && !is_pointer) + if (!pointer && !is_pointer && !sym->attr.pointer) { if (context) gfc_error ("Dummy argument '%s' with INTENT(IN) in variable"