Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c	(revision 197305)
+++ gcc/fortran/decl.c	(working copy)
@@ -4487,7 +4487,15 @@ gfc_match_formal_arglist (gfc_symbol *progname, in
   for (;;)
     {
       if (gfc_match_char ('*') == MATCH_YES)
-	sym = NULL;
+	{
+	  sym = NULL;
+	  if (gfc_notify_std (GFC_STD_F95_OBS, "Alternate-return argument "
+			      "at %C") == FAILURE)
+	    {
+	      m = MATCH_ERROR;
+	      goto cleanup;
+	    }
+	}
       else
 	{
 	  m = gfc_match_name (name);
Index: gcc/fortran/interface.c
===================================================================
--- gcc/fortran/interface.c	(revision 197305)
+++ gcc/fortran/interface.c	(working copy)
@@ -1023,6 +1023,9 @@ static gfc_try
 check_dummy_characteristics (gfc_symbol *s1, gfc_symbol *s2,
 			     bool type_must_agree, char *errmsg, int err_len)
 {
+  if (s1 == NULL || s2 == NULL)
+    return s1 == s2 ? SUCCESS : FAILURE;
+
   /* Check type and rank.  */
   if (type_must_agree && !compare_type_rank (s2, s1))
     {
Index: gcc/testsuite/gfortran.dg/altreturn_2.f90
===================================================================
--- gcc/testsuite/gfortran.dg/altreturn_2.f90	(revision 197305)
+++ gcc/testsuite/gfortran.dg/altreturn_2.f90	(working copy)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+
        program altreturn_2
          call foo()  ! { dg-error "Missing alternate return" }
        contains
Index: gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90
===================================================================
--- gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90	(revision 197305)
+++ gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90	(working copy)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR30237 in which alternate returns in intrinsic
 ! actual arglists were quietly ignored.
 !
Index: gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90
===================================================================
--- gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90	(revision 197305)
+++ gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90	(working copy)
@@ -1,4 +1,6 @@
 ! { dg-do compile }
+! { dg-options "-std=legacy" }
+!
 ! Tests the fix for PR25102, which did not diagnose the aberrant interface
 ! assignement below.
 !
