On Fri, Apr 10, 2020 at 11:54:49AM +0200, Jakub Jelinek via Gcc-patches wrote: > On Thu, Apr 09, 2020 at 10:57:46PM +0200, Christophe Lyon via Gcc-patches > wrote: > > This patch makes GCC fail to build newlib when configured for > > aarch64_be-none-elf: > > 0x10c488c vt_expand_var_loc_chain > > > > /tmp/9192639_9.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/gcc/var-tracking.c:8355 > > Seems it is the cselib_record_sp_cfa_base_equiv part of the patch (reverting > the add_stores change doesn't make the ICE go away). > The following fixes it, but don't have cycles to properly test it right now:
Now committed to trunk in order to unbreak powerpc64le-linux/aarch64_be-linux bootstrap and various other targets after bootstrapping/regtesting it on {x86_64,powerpc64{,le}}-linux. Sorry for the breakage. > 2020-04-10 Jakub Jelinek <ja...@redhat.com> > > PR debug/94495 > * cselib.c (cselib_record_sp_cfa_base_equiv): Set PRESERVED_VALUE_P on > val->val_rtx. > > --- gcc/cselib.c.jj 2020-04-09 21:20:59.457529812 +0200 > +++ gcc/cselib.c 2020-04-10 11:49:45.820124893 +0200 > @@ -2695,7 +2695,10 @@ cselib_record_sp_cfa_base_equiv (HOST_WI > = cselib_lookup_from_insn (plus_constant (Pmode, sp_derived_value, > offset), > Pmode, 1, VOIDmode, insn); > if (val != NULL) > - cselib_record_set (stack_pointer_rtx, val, NULL); > + { > + PRESERVED_VALUE_P (val->val_rtx) = 1; > + cselib_record_set (stack_pointer_rtx, val, NULL); > + } > } > > /* Return true if V is SP_DERIVED_VALUE_P (or SP_DERIVED_VALUE_P + CONST_INT) > > Jakub Jakub