aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/semantics.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-22 18:53:47 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2017-03-22 18:53:47 +0000
commitd4d3d389c2e3f132c6294e264d5312272ee56b87 (patch)
treea471ecb06b4bad2f5c02925af84159d909cc3546 /gcc/cp/semantics.c
parent97e19e5a03eee006ddb67d6be9f4f5fecd277ecf (diff)
PR c++/80141
* semantics.c (finish_omp_clause) <case OMP_CLAUSE_SIMDLEN, case OMP_CLAUSE_ALIGNED>: Call maybe_constant_value only when not processing_template_decl. * g++.dg/gomp/pr80141.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246403 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/semantics.c')
-rw-r--r--gcc/cp/semantics.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index bcfdd668c3a..ad5299a06ee 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -6416,9 +6416,9 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
else
{
t = mark_rvalue_use (t);
- t = maybe_constant_value (t);
if (!processing_template_decl)
{
+ t = maybe_constant_value (t);
if (TREE_CODE (t) != INTEGER_CST
|| tree_int_cst_sgn (t) != 1)
{
@@ -6586,9 +6586,9 @@ finish_omp_clauses (tree clauses, enum c_omp_region_type ort)
else
{
t = mark_rvalue_use (t);
- t = maybe_constant_value (t);
if (!processing_template_decl)
{
+ t = maybe_constant_value (t);
if (TREE_CODE (t) != INTEGER_CST
|| tree_int_cst_sgn (t) != 1)
{