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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Author: jakub
Date: Thu Sep  7 11:20:40 2017
New Revision: 251843

URL: https://gcc.gnu.org/viewcvs?rev=251843&root=gcc&view=rev
Log:
        PR target/81979
        * output.h (switch_to_other_text_partition): New declaration.
        * varasm.c (switch_to_other_text_partition): New function.
        * config/rs6000/rs6000.c (uses_TOC): Return 2 if
        NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
        (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
        to the other text partition before emitting LCL label and switch back
        after emitting the word after it.

        * gcc.dg/pr81979.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr81979.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/output.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/varasm.c

Reply via email to