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.
From-SVN: r246403
+2017-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ 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.
+
2017-03-21 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/77752
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)
{
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)
{
2017-03-22 Jakub Jelinek <jakub@redhat.com>
+ PR c++/80141
+ * g++.dg/gomp/pr80141.C: New test.
+
PR c++/80129
* g++.dg/torture/pr80129.C: New test.
--- /dev/null
+// PR c++/80141
+// { dg-do compile }
+
+#pragma omp declare simd aligned (p : 2 && 2)
+template<int> void foo (int *p);
+
+#pragma omp declare simd simdlen (2 && 2)
+template<int> void bar (int *p);