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?

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


Reply via email to