Commit 48a78aee by Jakub Jelinek Committed by Jakub Jelinek

re PR middle-end/68221 (libgomp reduction-11/12 failures)

	PR middle-end/68221
	* omp-low.c (lower_rec_input_clauses): If C/C++ array reduction
	has non-zero bias, subtract it in integer type instead of
	pointer plus of negated bias.

	* testsuite/libgomp.c/reduction-11.c: Remove xfail.
	* testsuite/libgomp.c/reduction-12.c: Likewise.
	* testsuite/libgomp.c++/reduction-11.C: Likewise.
	* testsuite/libgomp.c++/reduction-12.C: Likewise.

From-SVN: r230672
parent 9a784760
2015-11-20 Jakub Jelinek <jakub@redhat.com> 2015-11-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/68221
* omp-low.c (lower_rec_input_clauses): If C/C++ array reduction
has non-zero bias, subtract it in integer type instead of
pointer plus of negated bias.
PR middle-end/68339 PR middle-end/68339
* omp-low.c (expand_simd_clones): Call node->get_body () before * omp-low.c (expand_simd_clones): Call node->get_body () before
allocating stuff in GC. allocating stuff in GC.
...@@ -4444,11 +4444,13 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist, ...@@ -4444,11 +4444,13 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
if (!integer_zerop (bias)) if (!integer_zerop (bias))
{ {
bias = fold_convert_loc (clause_loc, sizetype, bias); bias = fold_convert_loc (clause_loc, pointer_sized_int_node,
bias = fold_build1_loc (clause_loc, NEGATE_EXPR, bias);
sizetype, bias); yb = fold_convert_loc (clause_loc, pointer_sized_int_node,
x = fold_build2_loc (clause_loc, POINTER_PLUS_EXPR, x);
TREE_TYPE (x), x, bias); yb = fold_build2_loc (clause_loc, MINUS_EXPR,
pointer_sized_int_node, yb, bias);
x = fold_convert_loc (clause_loc, TREE_TYPE (x), yb);
yb = create_tmp_var (ptype, name); yb = create_tmp_var (ptype, name);
gimplify_assign (yb, x, ilist); gimplify_assign (yb, x, ilist);
x = yb; x = yb;
......
2015-11-20 Jakub Jelinek <jakub@redhat.com>
PR middle-end/68221
* testsuite/libgomp.c/reduction-11.c: Remove xfail.
* testsuite/libgomp.c/reduction-12.c: Likewise.
* testsuite/libgomp.c++/reduction-11.C: Likewise.
* testsuite/libgomp.c++/reduction-12.C: Likewise.
2015-11-19 Nathan Sidwell <nathan@codesourcery.com> 2015-11-19 Nathan Sidwell <nathan@codesourcery.com>
* libgomp.oacc-c-c++-common/reduction-dbl.c: New. * libgomp.oacc-c-c++-common/reduction-dbl.c: New.
......
// { dg-do run { xfail *-*-* } } // { dg-do run }
char z[10] = { 0 }; char z[10] = { 0 };
......
// { dg-do run { xfail *-*-* } } // { dg-do run }
template <typename T> template <typename T>
struct A struct A
......
/* { dg-do run { xfail *-*-* } } */ /* { dg-do run } */
char z[10] = { 0 }; char z[10] = { 0 };
......
/* { dg-do run { xfail *-*-* } } */ /* { dg-do run } */
struct A { int t; }; struct A { int t; };
struct B { char t; }; struct B { char t; };
......
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