aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2006-08-10 22:13:42 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2006-08-10 22:13:42 +0000
commit5d5995f10531955de2e5f3c1a0979205d71ffb70 (patch)
tree441815d76c21086dcc274b40493bc2c69d55c061 /gcc/tree.c
parentb576b3a7fda3f914807f1296124f15fe791b5a60 (diff)
downloadgcc-5d5995f10531955de2e5f3c1a0979205d71ffb70.zip
gcc-5d5995f10531955de2e5f3c1a0979205d71ffb70.tar.gz
gcc-5d5995f10531955de2e5f3c1a0979205d71ffb70.tar.bz2
tree.c (build1_stat): Also propagate the TREE_CONSTANT and TREE_INVARIANT flags for a VIEW_CONVERT_EXPR.
* tree.c (build1_stat): Also propagate the TREE_CONSTANT and TREE_INVARIANT flags for a VIEW_CONVERT_EXPR. From-SVN: r116071
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index dc78ad7..efccfb1 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -2923,11 +2923,11 @@ build1_stat (enum tree_code code, tree type, tree node MEM_STAT_DECL)
break;
default:
- if (TREE_CODE_CLASS (code) == tcc_unary
+ if ((TREE_CODE_CLASS (code) == tcc_unary || code == VIEW_CONVERT_EXPR)
&& node && !TYPE_P (node)
&& TREE_CONSTANT (node))
TREE_CONSTANT (t) = 1;
- if (TREE_CODE_CLASS (code) == tcc_unary
+ if ((TREE_CODE_CLASS (code) == tcc_unary || code == VIEW_CONVERT_EXPR)
&& node && TREE_INVARIANT (node))
TREE_INVARIANT (t) = 1;
if (TREE_CODE_CLASS (code) == tcc_reference