This patch fixes part of PR other/51174.
rs6000_xcoff_section_type_flags() can be called with a NULL decl.
This feature only was used on ELF paths which never called this XCOFF
function.

Bootstrapped on powerpc-ibm-aix5.3.0.0.

- David

        * config/rs6000/rs6000.c (rs6000_xcoff_section_type_flags):
        Default to minimum alignment if decl is NULL.

Index: rs6000.c
===================================================================
*** rs6000.c    (revision 181421)
--- rs6000.c    (working copy)
*************** rs6000_xcoff_section_type_flags (tree de
*** 25782,25788 ****
    unsigned int flags = default_section_type_flags (decl, name, reloc);

    /* Align to at least UNIT size.  */
!   if (flags & SECTION_CODE)
      align = MIN_UNITS_PER_WORD;
    else
      /* Increase alignment of large objects if not already stricter.  */
--- 25782,25788 ----
    unsigned int flags = default_section_type_flags (decl, name, reloc);

    /* Align to at least UNIT size.  */
!   if (flags & SECTION_CODE || !decl)
      align = MIN_UNITS_PER_WORD;
    else
      /* Increase alignment of large objects if not already stricter.  */

Reply via email to