This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/51360] [4.6 Regression] spurious unused-but-set-variable warning for var used in OpenMP pragma
- From: "jakub at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 09 Feb 2012 17:15:39 +0000
- Subject: [Bug c/51360] [4.6 Regression] spurious unused-but-set-variable warning for var used in OpenMP pragma
- Auto-submitted: auto-generated
- References: <bug-51360-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51360
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-02-09 17:15:39 UTC ---
Author: jakub
Date: Thu Feb 9 17:15:29 2012
New Revision: 184049
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=184049
Log:
Backported from mainline
2011-12-15 Jakub Jelinek <jakub@redhat.com>
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.
* gcc.dg/gomp/pr51360.c: New test.
* g++.dg/gomp/pr51360.C: New test.
* g++.dg/gomp/pr51360-2.C: New test.
Added:
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/gomp/pr51360-2.C
branches/gcc-4_6-branch/gcc/testsuite/g++.dg/gomp/pr51360.C
branches/gcc-4_6-branch/gcc/testsuite/gcc.dg/gomp/pr51360.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/c-parser.c
branches/gcc-4_6-branch/gcc/cp/ChangeLog
branches/gcc-4_6-branch/gcc/cp/semantics.c
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog