public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* RFD: improved diagnostics when reading module files
@ 2018-04-06 19:35 Harald Anlauf
  2018-04-06 19:58 ` Steve Kargl
  0 siblings, 1 reply; 7+ messages in thread
From: Harald Anlauf @ 2018-04-06 19:35 UTC (permalink / raw)
  To: fortran

Dear all,

while chasing down an ICE that occurred when reading inconsistent
modules files, I found that it might be helpful to change an assert
in module.c:5164 into some error message.  Suggestion:

Index: gcc/fortran/module.c
===================================================================
--- gcc/fortran/module.c        (revision 259152)
+++ gcc/fortran/module.c        (working copy)
@@ -5161,7 +5161,13 @@
              if (p->u.pointer == NULL)
                associate_integer_pointer (p, c);
              mio_pool_string (&comp_name);
-             gcc_assert (comp_name == c->name);
+             if (comp_name != c->name)
+               {
+                 gfc_error_now ("While reading module files: mismatch in "
+                                "derived type components: %qs != %qs",
+                                comp_name, c->name);
+               }
+             /* gcc_assert (comp_name == c->name); */
              skip_list (1); /* component end.  */
            }
          mio_rparen (); /* component list closing.  */


Is this something worth considering?

Harald

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-04-15 19:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-06 19:35 RFD: improved diagnostics when reading module files Harald Anlauf
2018-04-06 19:58 ` Steve Kargl
2018-04-06 21:18   ` Harald Anlauf
2018-04-06 23:59     ` Steve Kargl
2018-04-07 16:16       ` Harald Anlauf
2018-04-07 16:45         ` Steve Kargl
2018-04-15 19:21           ` Harald Anlauf

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).