aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-03-18 13:21:02 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2008-03-18 13:21:02 +0100
commit8119fc93077ce835232c711273cd8f3b097f17f4 (patch)
treecefe0df94ad8e0d6712d5f82009935b5d05d0634 /gcc
parent9e7759638ae59400bcd321db6404962c5f0ba29a (diff)
downloadgcc-8119fc93077ce835232c711273cd8f3b097f17f4.zip
gcc-8119fc93077ce835232c711273cd8f3b097f17f4.tar.gz
gcc-8119fc93077ce835232c711273cd8f3b097f17f4.tar.bz2
re PR middle-end/35611 (FAIL: libgomp.c/omp-nested-1.c execution test)
PR middle-end/35611 * gimplify.c (gimplify_expr): Gimplify second operand of OMP_ATOMIC_LOAD. * testsuite/libgomp.c/atomic-4.c: New test. From-SVN: r133309
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gimplify.c12
2 files changed, 15 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 2830927..e5706fb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/35611
+ * gimplify.c (gimplify_expr): Gimplify second operand of
+ OMP_ATOMIC_LOAD.
+
2008-03-17 Richard Guenther <rguenther@suse.de>
PR tree-optimization/19637
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index a75c711..102ce3e 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -6022,12 +6022,18 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
case OMP_RETURN:
case OMP_CONTINUE:
- case OMP_ATOMIC_LOAD:
- case OMP_ATOMIC_STORE:
-
+ case OMP_ATOMIC_STORE:
ret = GS_ALL_DONE;
break;
+ case OMP_ATOMIC_LOAD:
+ if (gimplify_expr (&TREE_OPERAND (*expr_p, 1), pre_p, NULL,
+ is_gimple_val, fb_rvalue) != GS_ALL_DONE)
+ ret = GS_ERROR;
+ else
+ ret = GS_ALL_DONE;
+ break;
+
case POINTER_PLUS_EXPR:
/* Convert ((type *)A)+offset into &A->field_of_type_and_offset.
The second is gimple immediate saving a need for extra statement.