summaryrefslogtreecommitdiff
path: root/gcc/c-parser.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-15 17:29:25 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-15 17:29:25 +0000
commit80678da6ee0d18eaffad737851c60c00764976db (patch)
treed9175cdfc130e51e03e7c8c63c71f7397b829930 /gcc/c-parser.c
parent358633028887dea3d187c832c6307482b4fafe58 (diff)
downloadgcc-80678da6ee0d18eaffad737851c60c00764976db.tar.gz
PR c/51360
* c-parser.c (c_parser_omp_clause_num_threads, c_parser_omp_clause_schedule): Call mark_exp_read. * semantics.c (finish_omp_clauses): For OMP_CLAUSE_NUM_THREADS_EXPR and OMP_CLAUSE_SCHEDULE_CHUNK_EXPR call mark_rvalue_use. * c-c++-common/gomp/pr51360.c: New test. * g++.dg/gomp/pr51360.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182381 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-parser.c')
-rw-r--r--gcc/c-parser.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/c-parser.c b/gcc/c-parser.c
index e227137bfb0..0a268a691f5 100644
--- a/gcc/c-parser.c
+++ b/gcc/c-parser.c
@@ -9011,6 +9011,7 @@ c_parser_omp_clause_num_threads (c_parser *parser, tree list)
{
location_t expr_loc = c_parser_peek_token (parser)->location;
tree c, t = c_parser_expression (parser).value;
+ mark_exp_read (t);
t = c_fully_fold (t, false, NULL);
c_parser_skip_until_found (parser, CPP_CLOSE_PAREN, "expected %<)%>");
@@ -9218,6 +9219,7 @@ c_parser_omp_clause_schedule (c_parser *parser, tree list)
here = c_parser_peek_token (parser)->location;
t = c_parser_expr_no_commas (parser, NULL).value;
+ mark_exp_read (t);
t = c_fully_fold (t, false, NULL);
if (OMP_CLAUSE_SCHEDULE_KIND (c) == OMP_CLAUSE_SCHEDULE_RUNTIME)