[gomp] Add missing fold_convert in #pragma omp atomic handling (PR middle-end/28724)

Jakub Jelinek jakub@redhat.com
Tue Aug 15 13:42:00 GMT 2006


Hi!

OLDIVAL only sometimes has ITYPE, for integer and pointer types it
has TYPE, while OLDIVAL2 is always ITYPE.
The following patch fixes it, ok for trunk?

2006-08-15  Jakub Jelinek  <jakub@redhat.com>

	PR middle-end/28724
	* gimplify.c (gimplify_omp_atomic_pipeline): Convert oldival
	to itype in assignment to oldival2.

--- gcc/gimplify.c.jj	2006-07-20 08:26:15.000000000 +0200
+++ gcc/gimplify.c	2006-08-15 14:02:56.000000000 +0200
@@ -5129,7 +5129,8 @@ gimplify_omp_atomic_pipeline (tree *expr
       gimplify_and_add (x, pre_p);
     }
 
-  x = build2 (MODIFY_EXPR, void_type_node, oldival2, oldival);
+  x = build2 (MODIFY_EXPR, void_type_node, oldival2,
+	      fold_convert (itype, oldival));
   gimplify_and_add (x, pre_p);
 
   args = tree_cons (NULL, fold_convert (itype, newival), NULL);

	Jakub



More information about the Gcc-patches mailing list