Fix uninitialised use in mips_split_move
authorRichard Sandiford <richard.sandiford@arm.com>
Sun, 7 Jul 2019 09:49:14 +0000 (09:49 +0000)
committerRichard Sandiford <rsandifo@gcc.gnu.org>
Sun, 7 Jul 2019 09:49:14 +0000 (09:49 +0000)
commitf40ce450f3c4b1cfd0a7e9c68e0c2a60d04b2a03
tree90b1d02254fad6b9e9a1469c17d9526c069c2344
parent389aba0d2d8b437002017f9636676a81241140eb
Fix uninitialised use in mips_split_move

While testing the fix for PR91068, I hit an rtl checking failure
while building newlib.  mips_split_move was decomposing an address that
happened to be symbolic and then tried to access the REGNO of the base
register field, which wasn't initialised but which by chance pointed to
valid memory.

2019-07-07  Richard Sandiford  <richard.sandiford@arm.com>

gcc/
* config/mips/mips.c (mips_split_move): Zero-initialize addr
and check whether addr.reg is nonnull before using it.

From-SVN: r273174
gcc/ChangeLog
gcc/config/mips/mips.c