From: Jakub Jelinek Date: Thu, 7 Apr 2011 18:21:10 +0000 (+0200) Subject: backport: omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs directly. X-Git-Tag: releases/gcc-4.5.3~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e660b43bf6210421c801621a0adb2986508c66e8;p=thirdparty%2Fgcc.git backport: omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs directly. Backported from mainline 2010-07-01 Richard Guenther * omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs directly. From-SVN: r172111 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index caf349b10620..d04de4db30a2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2011-04-07 Jakub Jelinek + + Backported from mainline + 2010-07-01 Richard Guenther + + * omp-low.c (scan_omp_1_op): Don't change type of INTEGER_CSTs + directly. + 2011-04-07 Andrey Belevantsev Backport from mainline diff --git a/gcc/omp-low.c b/gcc/omp-low.c index cc36cb51bc57..f3c0fb2a4fd0 100644 --- a/gcc/omp-low.c +++ b/gcc/omp-low.c @@ -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; }