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
This commit is contained in:
parent
fd6cba40e1
commit
f13e9cd513
|
@ -1,3 +1,10 @@
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
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.
|
||||
|
||||
|
|
|
@ -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);
|
Loading…
Reference in New Issue