https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88343

--- Comment #21 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Before the holidays I did this patch:

===
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index fa5f032..2ffe7d9 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -8721,7 +8721,10 @@ rs6000_legitimize_tls_address (rtx addr, enum tls_model
model)
       else
        {
          if (flag_pic == 1)
-           got = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
+           {
+             got = gen_rtx_REG (Pmode, RS6000_PIC_OFFSET_TABLE_REGNUM);
+             crtl->uses_pic_offset_table = 1;
+           }
          else
            {
              rtx gsym = rs6000_got_sym ();
===

... but I have no idea if it solved things or not (before Iain alerted me to
it I had no idea what it was _for_!)

Joseph, could you try it out?

Reply via email to