public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/66106] New: ICE on incomplete interface operator block (gfc_op2string)
@ 2015-05-11 16:20 gerhard.steinmetz.fortran@t-online.de
2015-05-11 18:03 ` [Bug fortran/66106] " kargl at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gerhard.steinmetz.fortran@t-online.de @ 2015-05-11 16:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66106
Bug ID: 66106
Summary: ICE on incomplete interface operator block
(gfc_op2string)
Product: gcc
Version: 5.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: gerhard.steinmetz.fortran@t-online.de
Target Milestone: ---
This code snippet with an incomplete interface operator block ...
program p
interface operator ( .gt. )
end interface operator
end
or this variation (wrong) ...
program p
interface operator ( .gt. )
end interface gt
end
or this variation (wrong) ...
program p
interface operator ( > )
end interface gt
end
prints (with gfortran 5.1.1 on SUSE Linux 13.2, 64 bit)
f951: internal compiler error: gfc_op2string(): Bad code
---
Whereas for example ...
subroutine p
interface assignment ( = )
end interface assignment
end
$ gfortran -c snippet.f90
Error: Expected 'END INTERFACE ASSIGNMENT (=)' at (1)
Kind regards.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/66106] ICE on incomplete interface operator block (gfc_op2string)
2015-05-11 16:20 [Bug fortran/66106] New: ICE on incomplete interface operator block (gfc_op2string) gerhard.steinmetz.fortran@t-online.de
@ 2015-05-11 18:03 ` kargl at gcc dot gnu.org
2015-05-19 18:35 ` kargl at gcc dot gnu.org
2015-05-19 18:37 ` kargl at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-11 18:03 UTC (permalink / raw)
To: gcc-bugs
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'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/66106] ICE on incomplete interface operator block (gfc_op2string)
2015-05-11 16:20 [Bug fortran/66106] New: ICE on incomplete interface operator block (gfc_op2string) gerhard.steinmetz.fortran@t-online.de
2015-05-11 18:03 ` [Bug fortran/66106] " kargl at gcc dot gnu.org
@ 2015-05-19 18:35 ` kargl at gcc dot gnu.org
2015-05-19 18:37 ` kargl at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-19 18:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66106
--- Comment #2 from kargl at gcc dot gnu.org ---
Author: kargl
Date: Tue May 19 18:34:55 2015
New Revision: 223411
URL: https://gcc.gnu.org/viewcvs?rev=223411&root=gcc&view=rev
Log:
Fix the ChangeLog entries to have the correct PR fortran/66106
designation.
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/66106] ICE on incomplete interface operator block (gfc_op2string)
2015-05-11 16:20 [Bug fortran/66106] New: ICE on incomplete interface operator block (gfc_op2string) gerhard.steinmetz.fortran@t-online.de
2015-05-11 18:03 ` [Bug fortran/66106] " kargl at gcc dot gnu.org
2015-05-19 18:35 ` kargl at gcc dot gnu.org
@ 2015-05-19 18:37 ` kargl at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: kargl at gcc dot gnu.org @ 2015-05-19 18:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66106
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
Target Milestone|--- |5.2
--- Comment #3 from kargl at gcc dot gnu.org ---
Fixed on trunk and 5-branch. Thanks for the bug report.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-05-19 18:37 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-11 16:20 [Bug fortran/66106] New: ICE on incomplete interface operator block (gfc_op2string) gerhard.steinmetz.fortran@t-online.de
2015-05-11 18:03 ` [Bug fortran/66106] " kargl at gcc dot gnu.org
2015-05-19 18:35 ` kargl at gcc dot gnu.org
2015-05-19 18:37 ` kargl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).