]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs directly.
authorJakub Jelinek <jakub@redhat.com>
Thu, 7 Apr 2011 18:21:10 +0000 (20:21 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 7 Apr 2011 18:21:10 +0000 (20:21 +0200)
Backported from mainline
2010-07-01  Richard Guenther  <rguenther@suse.de>

* omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs
directly.

From-SVN: r172111

gcc/ChangeLog
gcc/omp-low.c

index caf349b106208cfb8b26305792d82b4b93a367b9..d04de4db30a2fe945a1c67c0555ae902ee953cb0 100644 (file)
@@ -1,3 +1,11 @@
+2011-04-07  Jakub Jelinek  <jakub@redhat.com>
+
+       Backported from mainline
+       2010-07-01  Richard Guenther  <rguenther@suse.de>
+
+       * omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs
+       directly.
+
 2011-04-07  Andrey Belevantsev  <abel@ispras.ru>
 
        Backport from mainline
index cc36cb51bc570800c86a49e1a59faaa3a93f6180..f3c0fb2a4fd070b083cc6ad45b2f83b23feb0aec 100644 (file)
@@ -1930,7 +1930,18 @@ scan_omp_1_op (tree *tp, int *walk_subtrees, void *data)
        {
          *walk_subtrees = 1;
          if (ctx)
-           TREE_TYPE (t) = remap_type (TREE_TYPE (t), &ctx->cb);
+           {
+             tree tem = remap_type (TREE_TYPE (t), &ctx->cb);
+             if (tem != TREE_TYPE (t))
+               {
+                 if (TREE_CODE (t) == INTEGER_CST)
+                   *tp = build_int_cst_wide (tem,
+                                             TREE_INT_CST_LOW (t),
+                                             TREE_INT_CST_HIGH (t));
+                 else
+                   TREE_TYPE (t) = tem;
+               }
+           }
        }
       break;
     }