This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/77534] ICE in check_dtio_arg_TKR_intent, at fortran/interface.c:4572
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 08 Sep 2016 18:58:31 +0000
- Subject: [Bug fortran/77534] ICE in check_dtio_arg_TKR_intent, at fortran/interface.c:4572
- Auto-submitted: auto-generated
- References: <bug-77534-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77534
kargl at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kargl at gcc dot gnu.org
--- Comment #1 from kargl at gcc dot gnu.org ---
One should return from check_dtio_arg_TKR_intent() after
any error is issued instead of falling through to the
end of the function. The following prevents the ICE.
Index: interface.c
===================================================================
--- interface.c (revision 240038)
+++ interface.c (working copy)
@@ -4559,8 +4570,11 @@ check_dtio_arg_TKR_intent (gfc_symbol *f
int kind, int rank, sym_intent intent)
{
if (fsym->ts.type != type)
- gfc_error ("DTIO dummy argument at %L must be of type %s",
- &fsym->declared_at, gfc_basic_typename (type));
+ {
+ gfc_error ("DTIO dummy argument at %L must be of type %s",
+ &fsym->declared_at, gfc_basic_typename (type));
+ return;
+ }
if (fsym->ts.type != BT_CLASS && fsym->ts.type != BT_DERIVED
&& fsym->ts.kind != kind)