From: Bernd Schmidt Date: Fri, 27 Oct 2000 12:56:40 +0000 (+0000) Subject: Avoid incorrect setting of MEM_IN_STRUCT_P X-Git-Tag: prereleases/gcc-2.95.3-test1~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=803854ab543354bf77abdbba0eeddf7407748481;p=thirdparty%2Fgcc.git Avoid incorrect setting of MEM_IN_STRUCT_P From-SVN: r37085 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 396c43c536e1..af8ef3d16127 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-10-27 Bernd Schmidt + + * expr.c (expand_expr, case INDIRECT_REF): If the address is a + PLUS, that does not prove the object is in a structure. + 2000-08-25 David Edelsohn * collect2.c (use_import_list): Always return 0 (disable). diff --git a/gcc/expr.c b/gcc/expr.c index 812e1fb661ce..98eadfa55995 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6262,12 +6262,8 @@ expand_expr (exp, target, tmode, modifier) } temp = gen_rtx_MEM (mode, op0); - /* If address was computed by addition, - mark this as an element of an aggregate. */ - if (TREE_CODE (exp1) == PLUS_EXPR - || (TREE_CODE (exp1) == SAVE_EXPR - && TREE_CODE (TREE_OPERAND (exp1, 0)) == PLUS_EXPR) - || AGGREGATE_TYPE_P (TREE_TYPE (exp)) + + if (AGGREGATE_TYPE_P (TREE_TYPE (exp)) || (TREE_CODE (exp1) == ADDR_EXPR && (exp2 = TREE_OPERAND (exp1, 0)) && AGGREGATE_TYPE_P (TREE_TYPE (exp2))))