summaryrefslogtreecommitdiff
path: root/gcc/stor-layout.c
diff options
context:
space:
mode:
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-16 21:33:19 +0000
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>2003-04-16 21:33:19 +0000
commit414bee428081fb2f8ab15201c1e1ce78c9a8f509 (patch)
treed54db0fbb9e85319256be0471da62b0bf8117eb6 /gcc/stor-layout.c
parent9a0db358530572f41ead88fa71a98a9584f507ad (diff)
downloadgcc-414bee428081fb2f8ab15201c1e1ce78c9a8f509.tar.gz
* tree.c (skip_simple_arithmetics_at, saved_expr_p): New functions.
(save_expr): Replace loop by call to skip_simple_arithmetics_at. * tree.h: Add prototypes for the two new functions. * fold-const.c (fold_binary_op_with_conditional_arg): Replace test updates introduced in the previous revision by call to saved_expr_p. * stor-layout.c (put_pending_size): Use skip_simple_arithmetics_at. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65702 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r--gcc/stor-layout.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c
index 7ebdda845d1..66067d6f276 100644
--- a/gcc/stor-layout.c
+++ b/gcc/stor-layout.c
@@ -128,10 +128,7 @@ put_pending_size (expr)
{
/* Strip any simple arithmetic from EXPR to see if it has an underlying
SAVE_EXPR. */
- while (TREE_CODE_CLASS (TREE_CODE (expr)) == '1'
- || (TREE_CODE_CLASS (TREE_CODE (expr)) == '2'
- && TREE_CONSTANT (TREE_OPERAND (expr, 1))))
- expr = TREE_OPERAND (expr, 0);
+ expr = skip_simple_arithmetic (expr);
if (TREE_CODE (expr) == SAVE_EXPR)
pending_sizes = tree_cons (NULL_TREE, expr, pending_sizes);