2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66057
* interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
* match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66057
* gfortran.dg/interface_operator_1.f90: New tests.
From-SVN: r223326
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66106
+ * interface.c(gfc_match_end_interface): Enforce F2008 C1202 (R1201).
+ * match.c(gfc_op2string): Return 'none' for INTRINSIC_NONE.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66057
break;
m = MATCH_ERROR;
- gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> at %C, "
- "but got %s", s1, s2);
+ if (strcmp(s2, "none") == 0)
+ gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> "
+ "at %C, ", s1);
+ else
+ gfc_error ("Expecting %<END INTERFACE OPERATOR (%s)%> at %C, "
+ "but got %s", s1, s2);
}
}
case INTRINSIC_PARENTHESES:
return "parens";
+ case INTRINSIC_NONE:
+ return "none";
+
default:
break;
}
+2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/66106
+ * gfortran.dg/interface_operator_1.f90: New tests.
+
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
PR fortran/66057
--- /dev/null
+! { dg-do compile }
+! PR fortran/66106
+!
+! Original code from Gerhard Steinmetz
+! <gerhard dot steinmetz dot fortran at t-online dot de>
+program p
+ interface operator ( .gt. )
+ end interface operator ! { dg-error "END INTERFACE OPERATOR" }
+end program p ! { dg-error "END INTERFACE" }
+! { dg-excess-errors "Unexpected end of file" }