@@ -6416,9 +6416,9 @@ finish_omp_clauses (tree clauses, enum c
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
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)
{
@@ -0,0 +1,8 @@
+// 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);