This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/77534] ICE in check_dtio_arg_TKR_intent, at fortran/interface.c:4572


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]