https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79066
Alan Modra <amodra at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|unassigned at gcc dot gnu.org |amodra at gmail dot com --- Comment #6 from Alan Modra <amodra at gmail dot com> --- The problem happens in lra-contraints.c:process_address_1. Search for HAVE_lo_sum. A high/lo_sum address is correctly rejected by the rs6000 backend as improper for V4 pic here: *ad.inner = gen_rtx_LO_SUM (Pmode, new_reg, addr); if (! valid_address_p (ad.mode, *ad.outer, ad.as)) { /* Try to put lo_sum into register. */ However the code then stuffs the high/lo_sum into a reg and that of course is seen as valid. One possible fix that occurs to me is to disable rs6000.md:elf_high when flag_pic.