> On 3 Mar 2025, at 19:52, Wilco Dijkstra <wilco.dijks...@arm.com> wrote: > > > Outline atomics is not designed to be used with -mcmodel=large, so disable > it automatically if the large code model is used. > > Passes regress, OK for commit? >
This restriction should be documented in invoke.texi IMO. I also think it would be more user friendly to warn them about the incompatibility if an explicit -moutline-atomics option is passed. It’s okay though to silently turn off the implicit default-on option though. Thanks, Kyrill > gcc: > PR target/112465 > * config/aarch64/aarch64.cc (aarch64_override_options_after_change_1): > Turn off outline atomics with -mcmodel=large. > > --- > > diff --git a/gcc/config/aarch64/aarch64.cc b/gcc/config/aarch64/aarch64.cc > index > fe76730b0a7c8a2baaae24152e13d82a12d5d0a3..31d083d11bfc3e9756b41c901c96749a7b8a840a > 100644 > --- a/gcc/config/aarch64/aarch64.cc > +++ b/gcc/config/aarch64/aarch64.cc > @@ -18563,6 +18563,10 @@ aarch64_override_options_after_change_1 (struct > gcc_options *opts) > intermediary step for the former. */ > if (flag_mlow_precision_sqrt) > flag_mrecip_low_precision_sqrt = true; > + > + /* Turn off outline atomics with -mcmodel=large. */ > + if (aarch64_cmodel == AARCH64_CMODEL_LARGE) > + opts->x_aarch64_flag_outline_atomics = 0; > } > > /* 'Unpack' up the internal tuning structs and update the options > >