expmed: Fix possible use of NULL_RTX return value from emit_store_flag
authorJozef Lawrynowicz <jozef.l@mittosystems.com>
Wed, 22 Jul 2020 11:37:29 +0000 (12:37 +0100)
committerJozef Lawrynowicz <jozef.l@mittosystems.com>
Wed, 22 Jul 2020 11:38:56 +0000 (12:38 +0100)
commit259c3965b1ba04f7ee022846af6173fb1c343bc8
treede7a0af58de95dcdf005eb1e4c8561a80a776e9b
parent4821e0aabee57d5b7f955f138a8bee4588240609
expmed: Fix possible use of NULL_RTX return value from emit_store_flag

MSP430 does not support have any store-flag instructions, so
emit_store_flag can return NULL_RTX.  Catch the NULL_RTX in
expmed.c:expand_sdiv_pow2.

gcc/ChangeLog:

* expmed.c (expand_sdiv_pow2): Check return value from emit_store_flag
is not NULL_RTX before use.
gcc/expmed.c