This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: c/838: sparc-solaris2.7 extra testsuite failures when RTL checking



  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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]