On Mon, Jan 26, 2026 at 11:33 AM Wilco Dijkstra <[email protected]> wrote: > > Hi Andrew, > > > +++ b/gcc/testsuite/gcc.target/aarch64/pr123791.c > > @@ -0,0 +1,10 @@ > > +/* { dg-do compile } */ > > +/* { dg-options "-O2 -mpc-relative-literal-loads" } */ > > + > > +char * > > +foo () > > +{ > > + return (char *) (__UINTPTR_TYPE__) foo + 7483647; > > +} > > + > > +/* { dg-final { scan-assembler-not "\\.(word|xword)\tfoo" { xfail > > aarch64_large } } } */ > > > This is a real xfail or is it supposed to match for large code model? > > If it is a real xfail, please make sure there is a bug report filed > > for it (if there is one, please add the bug number to the testcase). > > Not sure what you mean. The large model will still emit the xword, so > this test fails with -mcmodel=large. Since there isn't an easy fix for GCC 16, > I marked it as xfail (ie. known issue, don't waste time on it). In the future > I'd like to redesign the large model to support PIC/PIE and seamlessly link > with small model objects. And since anchors generate better code and avoid > mixing code and data, we can remove pc-relative loads and per-function pools.
Ok, yes I forgot that large model does not fully support PIC/PIE. The patch is ok as is then. > > Cheers, > Wilco
