diff options
author | Olivier Hainque <hainque@act-europe.fr> | 2003-04-16 23:33:19 +0200 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 2003-04-16 17:33:19 -0400 |
commit | a9ecacf6c44316e20d54c36f84ae80dedfff09e6 (patch) | |
tree | d54db0fbb9e85319256be0471da62b0bf8117eb6 /gcc/stor-layout.c | |
parent | 15b19a7dbf433b1936eecd042ce7dedbb23220f9 (diff) | |
download | gcc-a9ecacf6c44316e20d54c36f84ae80dedfff09e6.zip gcc-a9ecacf6c44316e20d54c36f84ae80dedfff09e6.tar.gz gcc-a9ecacf6c44316e20d54c36f84ae80dedfff09e6.tar.bz2 |
tree.c (skip_simple_arithmetics_at, [...]): New functions.
* 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.
From-SVN: r65702
Diffstat (limited to 'gcc/stor-layout.c')
-rw-r--r-- | gcc/stor-layout.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index 7ebdda8..66067d6 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); |