This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/79428] ICE in c_parser_consume_token, at c/c-parser.c:770
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 08 Feb 2017 17:43:20 +0000
- Subject: [Bug c/79428] ICE in c_parser_consume_token, at c/c-parser.c:770
- Auto-submitted: auto-generated
- References: <bug-79428-4@http.gcc.gnu.org/bugzilla/>
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;
}