diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2019-01-08 19:09:52 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2019-01-08 19:09:52 +0000 |
commit | 6976bc87f162c542c2b92ee222401150af3fcc34 (patch) | |
tree | efa30928e9dbfef2ed18559f1d0b8c370c3d851e | |
parent | 53ef4e3a942fc5848690dbf36e67c8c68f7fbae4 (diff) | |
download | gcc-6976bc87f162c542c2b92ee222401150af3fcc34.zip gcc-6976bc87f162c542c2b92ee222401150af3fcc34.tar.gz gcc-6976bc87f162c542c2b92ee222401150af3fcc34.tar.bz2 |
re PR bootstrap/88721 (-Wmaybe-uninitialized warnings in sparc.c)
PR bootstrap/88721
* config/sparc/sparc.c (function_arg_slotno): Set *PPREGNO & *PPADDING
to -1 on entry.
PR debug/88723
* config/sparc/sparc.c (sparc_delegitimize_address): Deal with naked
UNSPECs and UNSPEC_MOVE_GOTDATA specifically.
From-SVN: r267734
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 17 |
2 files changed, 24 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7b4f6e5..18dab7e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2019-01-08 Eric Botcazou <ebotcazou@adacore.com> + + PR bootstrap/88721 + * config/sparc/sparc.c (function_arg_slotno): Set *PPREGNO & *PPADDING + to -1 on entry. + + PR debug/88723 + * config/sparc/sparc.c (sparc_delegitimize_address): Deal with naked + UNSPECs and UNSPEC_MOVE_GOTDATA specifically. + 2019-01-08 H.J. Lu <hongjiu.lu@intel.com> PR target/88717 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 72669af..62644e0 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -4949,12 +4949,19 @@ sparc_delegitimize_address (rtx x) { x = delegitimize_mem_from_attrs (x); - if (GET_CODE (x) == LO_SUM && GET_CODE (XEXP (x, 1)) == UNSPEC) - switch (XINT (XEXP (x, 1), 1)) + if (GET_CODE (x) == LO_SUM) + x = XEXP (x, 1); + + if (GET_CODE (x) == UNSPEC) + switch (XINT (x, 1)) { case UNSPEC_MOVE_PIC: case UNSPEC_TLSLE: - x = XVECEXP (XEXP (x, 1), 0, 0); + x = XVECEXP (x, 0, 0); + gcc_assert (GET_CODE (x) == SYMBOL_REF); + break; + case UNSPEC_MOVE_GOTDATA: + x = XVECEXP (x, 0, 2); gcc_assert (GET_CODE (x) == SYMBOL_REF); break; default: @@ -6873,6 +6880,10 @@ function_arg_slotno (const struct sparc_args *cum, machine_mode mode, int slotno = cum->words, regno; enum mode_class mclass = GET_MODE_CLASS (mode); + /* Silence warnings in the callers. */ + *pregno = -1; + *ppadding = -1; + if (type && TREE_ADDRESSABLE (type)) return -1; |