Commit f13e9cd5 by Jakub Jelinek Committed by Jakub Jelinek

re PR c++/80141 (ICE with pragma omp declare)

	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
parent fd6cba40
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
......
......@@ -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)
{
......
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.
......
// 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);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment