diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 00d25f18f9c422a8690150c0bf5c2759ee85322c..76bab59a888bb37a0f69e5aa07a2f9b201493451 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-11-06 Kazu Hirata <kazu@cs.umass.edu> + + * fold-const.c (non_lvalue): Don't construct NON_LVALUE_EXPR + if we are in GIMPLE. + 2004-11-06 Hans-Peter Nilsson <hp@bitrange.com> PR rtl-optimization/17933 diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 01054d192bd9821400ef6347c81ea23e2118f24f..00840205979b84905828880ae58b85a99ddcce72 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -1978,6 +1978,11 @@ fold_convert (tree type, tree arg) tree non_lvalue (tree x) { + /* While we are in GIMPLE, NON_LVALUE_EXPR doesn't mean anything to + us. */ + if (in_gimple_form) + return x; + /* We only need to wrap lvalue tree codes. */ switch (TREE_CODE (x)) {