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

Alan Modra <amodra at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |amodra at gmail dot com

--- Comment #11 from Alan Modra <amodra at gmail dot com> ---
Making the toc initialization in rs6000_file_start not depend on flag_pic, ie.
use
  if (DEFAULT_ABI != ABI_DARWIN)
    {
      switch_to_section (toc_section);
      switch_to_section (text_section);
    }

and applying Jakub's option handling fix for pr61925 to the rs6000 backend, and
fixing a testcase seems to cure this problem.

However, I'll note that the comment #7 testcase fails to compile foo non-PIC,
even on x86 -m32.  Looks like flag_pic and a whole bunch of other flags are not
saved/restored around attribute((optimize())).

Reply via email to