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 c/79428] ICE in c_parser_consume_token, at c/c-parser.c:770


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79428

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2017-02-08
                 CC|                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed.

We hit this:
770   gcc_assert (!parser->in_pragma || parser->tokens[0].type !=
CPP_PRAGMA_EOL);
because
  173   /* True if we're processing a pragma, and shouldn't automatically
  174      consume CPP_PRAGMA_EOL.  */
  175   BOOL_BITFIELD in_pragma : 1;

So maybe just
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -15460,7 +15460,7 @@ c_parser_omp_ordered (c_parser *parser, enum
pragma_context context,
   if (context != pragma_stmt && context != pragma_compound)
     {
       c_parser_error (parser, "expected declaration specifiers");
-      c_parser_skip_until_found (parser, CPP_PRAGMA_EOL, NULL);
+      c_parser_skip_to_pragma_eol (parser, false);
       return false;
     }

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