This is the mail archive of the 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]

Alpha bootstrap failure


It looks like -foptimize-sibling-calls -ffunction-sections
ICEs Alpha gcc.
The issue is that:
#define FUNCTION_OK_FOR_SIBCALL(DECL)                   \
  (DECL                                                 \
   && ((TREE_ASM_WRITTEN (DECL) && !flag_pic)           \
       || ! TREE_PUBLIC (DECL)))
static bool
decl_in_text_section (decl)
     tree decl;
  return (DECL_SECTION_NAME (decl) == NULL_TREE
          && ! (flag_function_sections
                || (targetm.have_named_sections
                    && DECL_ONE_ONLY (decl))));

I think all DECL_ONE_ONLY functions will be public, so only the
flag_function_sections case is problematic.
I think either || (! TREE_PUBLIC (DECL) && ! flag_function_sections)
in FUNCTION_OK_FOR_SIBCALL or just deleting flag_function_section
check from decl_in_text_section should fix this.
Is that check in decl_in_text_section because you fear the two might be too
far away from each other? With recent ld script changes they won't be,
but earlier linker script could put them far away from each other.
Which way do you prefer?


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