This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: c/838: sparc-solaris2.7 extra testsuite failures when RTL checking
- To: Graham Stott <grahams at redhat dot com>
- Subject: Re: c/838: sparc-solaris2.7 extra testsuite failures when RTL checking
- From: law at redhat dot com
- Date: Tue, 21 Nov 2000 11:09:51 -0700
- cc: ghazi at caip dot rutgers dot edu, rth at redhat dot com, gcc-patches at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <3A1ABA29.3FCE192C@redhat.com>you write:
> * expr.c (store_constructor): Pass alias set 0 if the target is a REG.
>
>
> ---------------------------------------------------------------------------
> ---------------------------
> Index: expr.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/gcc/expr.c,v
> retrieving revision 1.277
> diff -c -p -r1.277 expr.c
> *** expr.c 2000/11/21 06:55:41 1.277
> --- expr.c 2000/11/21 16:37:43
> *************** store_constructor (exp, target, align, c
> *** 4409,4415 ****
> store_constructor_field (to_rtx, bitsize, bitpos, mode,
> TREE_VALUE (elt), type, align, cleared,
> DECL_NONADDRESSABLE_P (field)
> ! ? MEM_ALIAS_SET (to_rtx)
> : get_alias_set (TREE_TYPE (field)));
> }
> }
> --- 4409,4415 ----
> store_constructor_field (to_rtx, bitsize, bitpos, mode,
> TREE_VALUE (elt), type, align, cleared,
> DECL_NONADDRESSABLE_P (field)
> ! ? (GET_CODE (to_rtx) == REG ? 0 : MEM_AL
> IAS_SET (to_rtx))
> : get_alias_set (TREE_TYPE (field)));
I would write it as
(GET_CODE (to_rtx) == MEM ? MEM_ALIAS_SET (to_rtx) : 0)
The idea being that only MEMs have alias sets, so if to_rtx is a MEM, then
use its alias set, else zero.
jeff