From dea8be3e9fea111391e7710c41cff0ce6c8b6b05 Mon Sep 17 00:00:00 2001 From: Geoffrey Keating Date: Fri, 20 Apr 2001 01:34:01 +0000 Subject: [PATCH] fold-const.c (fold): Use first_rtl_op rather than TREE_CODE_LENGTH when... * fold-const.c (fold): Use first_rtl_op rather than TREE_CODE_LENGTH when looping over parameters of a tree. Correct strange grouping in test for evaluated SAVE_EXPR. From-SVN: r41437 --- gcc/ChangeLog | 6 ++++++ gcc/fold-const.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e291df9..5af147e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2001-04-19 Geoff Keating + + * fold-const.c (fold): Use first_rtl_op rather than + TREE_CODE_LENGTH when looping over parameters of a tree. + Correct strange grouping in test for evaluated SAVE_EXPR. + Thu Apr 19 19:15:26 2001 Jeffrey A Law (law@cygnus.com) * config/pa/pa-linux.h (CPLUSPLUS_CPP_SPEC): Undefine. diff --git a/gcc/fold-const.c b/gcc/fold-const.c index a595b6e..1ee585d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -4864,7 +4864,7 @@ fold (expr) /* Don't try to process an RTL_EXPR since its operands aren't trees. Likewise for a SAVE_EXPR that's already been evaluated. */ - if (code == RTL_EXPR || (code == SAVE_EXPR && SAVE_EXPR_RTL (t)) != 0) + if (code == RTL_EXPR || (code == SAVE_EXPR && SAVE_EXPR_RTL (t) != 0)) return t; /* Return right away if a constant. */ @@ -4903,7 +4903,7 @@ fold (expr) } else if (IS_EXPR_CODE_CLASS (kind) || kind == 'r') { - register int len = TREE_CODE_LENGTH (code); + register int len = first_rtl_op (code); register int i; for (i = 0; i < len; i++) { -- 2.7.4