re PR c++/36237 (internal compiler error: in lower_stmt, at gimple-low.c:282 erase 'private(localTodoStack)' it compiles successfully.)
PR c++/36237 * cp-gimplify.c (cxx_omp_clause_apply_fn): Call fold_build_cleanup_point_expr on build_call_a results. * g++.dg/gomp/pr36237.C: New test. From-SVN: r135802
This commit is contained in:
parent
cf38a465ec
commit
c2898ec950
@ -1,5 +1,9 @@
|
|||||||
2008-05-23 Jakub Jelinek <jakub@redhat.com>
|
2008-05-23 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/36237
|
||||||
|
* cp-gimplify.c (cxx_omp_clause_apply_fn): Call
|
||||||
|
fold_build_cleanup_point_expr on build_call_a results.
|
||||||
|
|
||||||
PR c++/36308
|
PR c++/36308
|
||||||
* semantics.c (omp_clause_info_fndecl): New function.
|
* semantics.c (omp_clause_info_fndecl): New function.
|
||||||
(finish_omp_clauses): Use it.
|
(finish_omp_clauses): Use it.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/* C++-specific tree lowering bits; see also c-gimplify.c and tree-gimple.c.
|
/* C++-specific tree lowering bits; see also c-gimplify.c and tree-gimple.c.
|
||||||
|
|
||||||
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007
|
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
|
||||||
Free Software Foundation, Inc.
|
Free Software Foundation, Inc.
|
||||||
Contributed by Jason Merrill <jason@redhat.com>
|
Contributed by Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
@ -784,7 +784,7 @@ cp_genericize (tree fndecl)
|
|||||||
static tree
|
static tree
|
||||||
cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
|
cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
|
||||||
{
|
{
|
||||||
tree defparm, parm;
|
tree defparm, parm, t;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int nargs;
|
int nargs;
|
||||||
tree *argarray;
|
tree *argarray;
|
||||||
@ -804,7 +804,7 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
|
|||||||
tree inner_type = TREE_TYPE (arg1);
|
tree inner_type = TREE_TYPE (arg1);
|
||||||
tree start1, end1, p1;
|
tree start1, end1, p1;
|
||||||
tree start2 = NULL, p2 = NULL;
|
tree start2 = NULL, p2 = NULL;
|
||||||
tree ret = NULL, lab, t;
|
tree ret = NULL, lab;
|
||||||
|
|
||||||
start1 = arg1;
|
start1 = arg1;
|
||||||
start2 = arg2;
|
start2 = arg2;
|
||||||
@ -849,6 +849,8 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
|
|||||||
argarray[i] = convert_default_arg (TREE_VALUE (parm),
|
argarray[i] = convert_default_arg (TREE_VALUE (parm),
|
||||||
TREE_PURPOSE (parm), fn, i);
|
TREE_PURPOSE (parm), fn, i);
|
||||||
t = build_call_a (fn, i, argarray);
|
t = build_call_a (fn, i, argarray);
|
||||||
|
t = fold_convert (void_type_node, t);
|
||||||
|
t = fold_build_cleanup_point_expr (TREE_TYPE (t), t);
|
||||||
append_to_statement_list (t, &ret);
|
append_to_statement_list (t, &ret);
|
||||||
|
|
||||||
t = TYPE_SIZE_UNIT (inner_type);
|
t = TYPE_SIZE_UNIT (inner_type);
|
||||||
@ -881,7 +883,9 @@ cxx_omp_clause_apply_fn (tree fn, tree arg1, tree arg2)
|
|||||||
argarray[i] = convert_default_arg (TREE_VALUE (parm),
|
argarray[i] = convert_default_arg (TREE_VALUE (parm),
|
||||||
TREE_PURPOSE (parm),
|
TREE_PURPOSE (parm),
|
||||||
fn, i);
|
fn, i);
|
||||||
return build_call_a (fn, i, argarray);
|
t = build_call_a (fn, i, argarray);
|
||||||
|
t = fold_convert (void_type_node, t);
|
||||||
|
return fold_build_cleanup_point_expr (TREE_TYPE (t), t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,3 +1,8 @@
|
|||||||
|
2008-05-23 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
PR c++/36237
|
||||||
|
* g++.dg/gomp/pr36237.C: New test.
|
||||||
|
|
||||||
2008-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
2008-05-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||||
|
|
||||||
* gcc.dg/builtins-error.c: Test __builtin_fpclassify. Also
|
* gcc.dg/builtins-error.c: Test __builtin_fpclassify. Also
|
||||||
|
25
gcc/testsuite/g++.dg/gomp/pr36237.C
Normal file
25
gcc/testsuite/g++.dg/gomp/pr36237.C
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
// PR c++/36237
|
||||||
|
// { dg-do compile }
|
||||||
|
// { dg-options "-fopenmp" }
|
||||||
|
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
~A ();
|
||||||
|
};
|
||||||
|
|
||||||
|
struct B
|
||||||
|
{
|
||||||
|
B (const A &x = A ()) : a (x) { }
|
||||||
|
A a;
|
||||||
|
};
|
||||||
|
|
||||||
|
B var;
|
||||||
|
|
||||||
|
void bar ();
|
||||||
|
|
||||||
|
void
|
||||||
|
foo ()
|
||||||
|
{
|
||||||
|
#pragma omp parallel private (var)
|
||||||
|
bar ();
|
||||||
|
}
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
extern "C" void abort ();
|
extern "C" void abort ();
|
||||||
|
|
||||||
static int ctors, dtors, copyctors, n, m;
|
static int n;
|
||||||
|
|
||||||
struct A
|
struct A
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user