re PR target/92095 (internal error with -O1 -mcpu=niagara2 -fPIE)
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 8 Nov 2019 12:30:47 +0000 (12:30 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 8 Nov 2019 12:30:47 +0000 (12:30 +0000)
commit0a83f1a441d7aaadecb368c237b6ee70bd7b91d6
tree8ec541b0850c5eae665b6acdf4fde17f16a30d4d
parent93ace3af2c44fa019f5141243be198fb2233c7f8
re PR target/92095 (internal error with -O1 -mcpu=niagara2 -fPIE)

PR target/92095
* config/sparc/sparc-protos.h (output_load_pcrel_sym): Declare.
* config/sparc/sparc.c (sparc_cannot_force_const_mem): Revert latest
  change.
(got_helper_needed): New static variable.
(output_load_pcrel_sym): New function.
(get_pc_thunk_name): Remove after inlining...
(load_got_register): ...here.  Rework the initialization of the GOT
register and of the GOT helper.
(save_local_or_in_reg_p): Test the REGNO of the GOT register.
(sparc_file_end): Test got_helper_needed to decide whether the GOT
helper must be emitted.  Use output_asm_insn instead of fprintf.
(sparc_init_pic_reg): In PIC mode, always initialize the PIC register
if optimization is enabled.
* config/sparc/sparc.md (load_pcrel_sym<P:mode>): Emit the assembly
by calling output_load_pcrel_sym.

From-SVN: r277966
gcc/ChangeLog
gcc/config/sparc/sparc-protos.h
gcc/config/sparc/sparc.c
gcc/config/sparc/sparc.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20191108-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/sparc/overflow-3.c
gcc/testsuite/gcc.target/sparc/overflow-4.c
gcc/testsuite/gcc.target/sparc/overflow-5.c