This is the mail archive of the gcc-patches@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]

[Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec


Hi all,

here is a small patch which fixes an ICE-on-invalid problem by simply
turning a "gcc_assert" into a MATCH_ERROR. I am aware that the
resulting error message ("Unclassifiable statement") is not the most
helpful one, but I couldn't come up with something better.

The problem is that "c(i)" is wrongly identified as a function call,
which is the best thing one can do at parsing time. But giving an
error message based on this (wrong) assumption will not be any more
helpful, therefore I prefer the "Unclassifiable statement".

Unless someone has a better idea how to treat this, I will commit the
attached patch as obvious.

Cheers,
Janus


2013-04-12  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/56266
    * primary.c (gfc_match_varspec): Turn gcc_assert into MATCH_ERROR.


2013-04-12  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/56261
    * gfortran.dg/typebound_proc_28.f03: New.

Attachment: pr56266.diff
Description: Binary data

Attachment: typebound_proc_28.f03
Description: Binary data


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