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]
Other format: [Raw text]

Fix problem with defaults in get_mem_attrs


The code to decide whether to produce a mem_attrs entry has to agree with the
way defaults are chosen by the corresponding MEM_* macros.  In the case of
MEM_ALIGN, it did not in a subtle way.  Fixed by:

Fri Apr  4 17:43:52 2003  Olivier Hainque <hainque at act-europe dot fr>

        * emit-rtl.c (get_mem_attrs): Adjust alignment tests determining
        use of default attributes to agree MEM_ALIGN macro.

*** gcc/emit-rtl.c.ori	Sat Apr 13 03:04:12 2002
--- gcc/emit-rtl.c	Tue Apr 30 19:57:18 2002
*************** get_mem_attrs (alias, expr, offset, size
*** 313,323 ****
    void **slot;
  
!   /* If everything is the default, we can just return zero.  */
    if (alias == 0 && expr == 0 && offset == 0
        && (size == 0
  	  || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size)))
!       && (align == BITS_PER_UNIT
! 	  || (STRICT_ALIGNMENT
! 	      && mode != BLKmode && align == GET_MODE_ALIGNMENT (mode))))
      return 0;
  
--- 313,324 ----
    void **slot;
  
!   /* If everything is the default, we can just return zero.
!      This must match what the corresponding MEM_* macros return when the
!      field is not present.  */
    if (alias == 0 && expr == 0 && offset == 0
        && (size == 0
  	  || (mode != BLKmode && GET_MODE_SIZE (mode) == INTVAL (size)))
!       && (STRICT_ALIGNMENT && mode != BLKmode
! 	  ? align == GET_MODE_ALIGNMENT (mode) : align == BITS_PER_UNIT))
      return 0;
  


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