PR target/81979
commit71abcdeeec6c9061302251010b18415620d4d2e2
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Sep 2017 11:20:40 +0000 (7 11:20 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 7 Sep 2017 11:20:40 +0000 (7 11:20 +0000)
treee19f3204ac224f9a848867cd139c2f2267adc1ab
parentedfb7dbc46bef51652470949d20be418d3ae2eaf
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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@251843 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/config/rs6000/rs6000.c
gcc/output.h
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr81979.c [new file with mode: 0644]
gcc/varasm.c