https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66106
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |NEW
Last reconfirmed| |2015-05-11
CC| |kargl at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from kargl at gcc dot gnu.org ---
Confirmed.
F2003 standard states
C1202 (R1201) The generic-spec shall be included in the end-interface-stmt
only if it is provided in the interface-stmt.
...
If the end-interface-stmt includes OPERATOR(defined-operator ), the
interface-stmt shall specify the same defined-operator.
This patch
Index: interface.c
===================================================================
--- interface.c (revision 222916)
+++ interface.c (working copy)
@@ -346,8 +346,12 @@ gfc_match_end_interface (void)
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);
}
}
Index: match.c
===================================================================
--- match.c (revision 222916)
+++ match.c (working copy)
@@ -110,6 +110,9 @@ gfc_op2string (gfc_intrinsic_op op)
case INTRINSIC_PARENTHESES:
return "parens";
+ case INTRINSIC_NONE:
+ return "none";
+
default:
break;
}
yields
% gfc6 -c jk.f90
jk.f90:3:28:
end interface operator
1
Error: Expecting 'END INTERFACE OPERATOR (.gt.)' at (1),
jk.f90:4:6:
end
1
Error: END INTERFACE statement expected at (1)
f951: Error: Unexpected end of file in 'jk.f90'