aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2016-01-26 20:53:37 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2016-01-26 20:53:37 +0100
commit4d2d386c47b1738e7c5ab722cc1a73643e99bfd6 (patch)
tree5c8eeacaebad5510e442bf09c0c571c3c19f6b64 /gcc
parent476805aea386cdaa54edbf84767ceb04e53afeac (diff)
downloadgcc-4d2d386c47b1738e7c5ab722cc1a73643e99bfd6.zip
gcc-4d2d386c47b1738e7c5ab722cc1a73643e99bfd6.tar.gz
gcc-4d2d386c47b1738e7c5ab722cc1a73643e99bfd6.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/rs6000/rs6000.c15
2 files changed, 16 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 98716c0..dd774be 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index b97dc19..7b9201a 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -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);