re PR c/59310 (FAIL: gcc.dg/gomp/openmp-simd-1.c (test for excess errors))

PR c/59310
	* c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
	to p_name before calling c_parser_omp_teams instead of after.
	(c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
	argument.  Remove unused p_name variable.

	* parser.c (cp_parser_omp_target): Call keep_next_level only
	if flag_openmp.

From-SVN: r205467
This commit is contained in:
Jakub Jelinek 2013-11-28 00:42:48 +01:00 committed by Jakub Jelinek
parent e1b6062615
commit e7bd1de1d4
4 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,11 @@
2013-11-28 Jakub Jelinek <jakub@redhat.com>
PR c/59310
* c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
to p_name before calling c_parser_omp_teams instead of after.
(c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
argument. Remove unused p_name variable.
2013-11-27 Aldy Hernandez <aldyh@redhat.com>
Jakub Jelinek <jakub@redhat.com>

View File

@ -12529,10 +12529,10 @@ c_parser_omp_target (c_parser *parser, enum pragma_context context)
"parallel for simd")];
c_parser_consume_token (parser);
strcpy (p_name, "#pragma omp target");
if (!flag_openmp) /* flag_openmp_simd */
return c_parser_omp_teams (loc, parser, p_name,
OMP_TARGET_CLAUSE_MASK, cclauses);
strcpy (p_name, "#pragma omp target");
keep_next_level ();
tree block = c_begin_compound_stmt (true);
tree ret = c_parser_omp_teams (loc, parser, p_name,
@ -13566,10 +13566,8 @@ c_parser_cilk_all_clauses (c_parser *parser)
loops. */
static void
c_parser_cilk_simd (c_parser *parser ATTRIBUTE_UNUSED)
c_parser_cilk_simd (c_parser *parser)
{
char p_name[100];
strcpy (p_name, "#pragma omp");
tree clauses = c_parser_cilk_all_clauses (parser);
tree block = c_begin_compound_stmt (true);
location_t loc = c_parser_peek_token (parser)->location;

View File

@ -1,3 +1,9 @@
2013-11-28 Jakub Jelinek <jakub@redhat.com>
PR c/59310
* parser.c (cp_parser_omp_target): Call keep_next_level only
if flag_openmp.
2013-11-27 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/58647

View File

@ -29968,10 +29968,10 @@ cp_parser_omp_target (cp_parser *parser, cp_token *pragma_tok,
cp_lexer_consume_token (parser->lexer);
strcpy (p_name, "#pragma omp target");
keep_next_level (true);
if (!flag_openmp) /* flag_openmp_simd */
return cp_parser_omp_teams (parser, pragma_tok, p_name,
OMP_TARGET_CLAUSE_MASK, cclauses);
keep_next_level (true);
tree sb = begin_omp_structured_block ();
unsigned save = cp_parser_begin_omp_structured_block (parser);
tree ret = cp_parser_omp_teams (parser, pragma_tok, p_name,