re PR middle-end/28724 (atomic produces type mismatches)
authorJakub Jelinek <jakub@redhat.com>
Tue, 15 Aug 2006 14:56:28 +0000 (16:56 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 15 Aug 2006 14:56:28 +0000 (16:56 +0200)
PR middle-end/28724
* gimplify.c (gimplify_omp_atomic_pipeline): Convert oldival
to itype in assignment to oldival2.

From-SVN: r116153

gcc/ChangeLog
gcc/gimplify.c

index 3706f53..1da5d55 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2006-07-14  Andrew Pinski  <pinksia@physics.uc.edu>
 
        PR c/27490
index 16e4d3c..e2586a0 100644 (file)
@@ -5129,7 +5129,8 @@ gimplify_omp_atomic_pipeline (tree *expr_p, tree *pre_p, tree addr,
       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);