re PR target/68662 (FAIL: gcc.dg/lto/20090210 c_lto_20090210_0.o-c_lto_20090210_1.o link, -O2 -flto -flto-partition=none -fuse-linker-plugin -fno-fat-lto-objects)

PR target/68662
	* config/rs6000/rs6000.c (rs6000_option_override_internal): Initialize
	toc_label_name unconditionally.
	(rs6000_emit_load_toc_table): Call ggc_strdup on toc_label_name for
	SYMBOL_REF string.  Use toc_label_name instead of constructing
	LCTOC1.
	(rs6000_elf_declare_function_name): Use toc_label_name instead of
	constructing LCTOC1.

From-SVN: r232844
This commit is contained in:
Jakub Jelinek 2016-01-26 20:53:37 +01:00 committed by Jakub Jelinek
parent 476805aea3
commit 4d2d386c47
2 changed files with 16 additions and 10 deletions

View File

@ -1,3 +1,14 @@
2016-01-26 Jakub Jelinek <jakub@redhat.com>
PR target/68662
* config/rs6000/rs6000.c (rs6000_option_override_internal): Initialize
toc_label_name unconditionally.
(rs6000_emit_load_toc_table): Call ggc_strdup on toc_label_name for
SYMBOL_REF string. Use toc_label_name instead of constructing
LCTOC1.
(rs6000_elf_declare_function_name): Use toc_label_name instead of
constructing LCTOC1.
2016-01-26 Martin Sebor <msebor@redhat.com>
PR other/69477

View File

@ -4560,8 +4560,7 @@ rs6000_option_override_internal (bool global_init_p)
if (TARGET_LONG_DOUBLE_128 && !TARGET_IEEEQUAD)
REAL_MODE_FORMAT (TFmode) = &ibm_extended_format;
if (TARGET_TOC)
ASM_GENERATE_INTERNAL_LABEL (toc_label_name, "LCTOC", 1);
ASM_GENERATE_INTERNAL_LABEL (toc_label_name, "LCTOC", 1);
/* We can only guarantee the availability of DI pseudo-ops when
assembling for 64-bit targets. */
@ -23983,7 +23982,7 @@ rs6000_emit_load_toc_table (int fromprolog)
ASM_GENERATE_INTERNAL_LABEL (buf, "L", CODE_LABEL_NUMBER (lab));
lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
if (flag_pic == 2)
got = gen_rtx_SYMBOL_REF (Pmode, toc_label_name);
got = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name));
else
got = rs6000_got_sym ();
tmp1 = tmp2 = dest;
@ -24027,7 +24026,7 @@ rs6000_emit_load_toc_table (int fromprolog)
{
rtx tocsym, lab;
tocsym = gen_rtx_SYMBOL_REF (Pmode, toc_label_name);
tocsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name));
lab = gen_label_rtx ();
emit_insn (gen_load_toc_v4_PIC_1b (tocsym, lab));
emit_move_insn (dest, gen_rtx_REG (Pmode, LR_REGNO));
@ -24040,10 +24039,7 @@ rs6000_emit_load_toc_table (int fromprolog)
else if (TARGET_ELF && !TARGET_AIX && flag_pic == 0 && TARGET_MINIMAL_TOC)
{
/* This is for AIX code running in non-PIC ELF32. */
char buf[30];
rtx realsym;
ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);
realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf));
rtx realsym = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (toc_label_name));
emit_insn (gen_elf_high (dest, realsym));
emit_insn (gen_elf_low (dest, dest, realsym));
@ -31726,9 +31722,8 @@ rs6000_elf_declare_function_name (FILE *file, const char *name, tree decl)
(*targetm.asm_out.internal_label) (file, "LCL", rs6000_pic_labelno);
ASM_GENERATE_INTERNAL_LABEL (buf, "LCTOC", 1);
fprintf (file, "\t.long ");
assemble_name (file, buf);
assemble_name (file, toc_label_name);
putc ('-', file);
ASM_GENERATE_INTERNAL_LABEL (buf, "LCF", rs6000_pic_labelno);
assemble_name (file, buf);