aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-09-25 08:47:43 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-09-25 08:47:43 +0200
commitd90c0a5980ceedb40f9f7536c32f17856997435a (patch)
tree11854d3aa5d168c198966468dbfb18b3c2fd2f09 /gcc/c
parenta16ee37946f575365bb39d238863422465902054 (diff)
downloadgcc-d90c0a5980ceedb40f9f7536c32f17856997435a.zip
gcc-d90c0a5980ceedb40f9f7536c32f17856997435a.tar.gz
gcc-d90c0a5980ceedb40f9f7536c32f17856997435a.tar.bz2
re PR c++/63249 ([OpenMP] Spurious »set but not used« warnings when actually used in OpenMP target's array section's lower-bound and length)
PR c++/63249 * semantics.c (handle_omp_array_sections_1): Call mark_rvalue_use on low_bound and length. * g++.dg/gomp/pr63249.C: New test. * c-c++-common/gomp/pr63249.c: New test. 2014-09-25 Thomas Schwinge <thomas@codesourcery.com> PR c++/63249 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read on low_bound and length. From-SVN: r215580
Diffstat (limited to 'gcc/c')
-rw-r--r--gcc/c/ChangeLog6
-rw-r--r--gcc/c/c-parser.c10
2 files changed, 14 insertions, 2 deletions
diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog
index 67099c1..cb69773 100644
--- a/gcc/c/ChangeLog
+++ b/gcc/c/ChangeLog
@@ -1,3 +1,9 @@
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/63249
+ * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
+ on low_bound and length.
+
2014-09-24 Marek Polacek <polacek@redhat.com>
PR c/61405
diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c
index 71f40b7..0d159fd 100644
--- a/gcc/c/c-parser.c
+++ b/gcc/c/c-parser.c
@@ -9882,7 +9882,10 @@ c_parser_omp_variable_list (c_parser *parser,
c_parser_consume_token (parser);
if (!c_parser_next_token_is (parser, CPP_COLON))
- low_bound = c_parser_expression (parser).value;
+ {
+ low_bound = c_parser_expression (parser).value;
+ mark_exp_read (low_bound);
+ }
if (c_parser_next_token_is (parser, CPP_CLOSE_SQUARE))
length = integer_one_node;
else
@@ -9895,7 +9898,10 @@ c_parser_omp_variable_list (c_parser *parser,
break;
}
if (!c_parser_next_token_is (parser, CPP_CLOSE_SQUARE))
- length = c_parser_expression (parser).value;
+ {
+ length = c_parser_expression (parser).value;
+ mark_exp_read (length);
+ }
}
/* Look for the closing `]'. */
if (!c_parser_require (parser, CPP_CLOSE_SQUARE,