Handle a null lhs in expand_direct_optab_fn (PR85862)
commitdde145b123b09b2c0136f2aa6ff1c55fd7301a42
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 May 2018 12:25:44 +0000 (22 12:25 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 22 May 2018 12:25:44 +0000 (22 12:25 +0000)
tree54e8716f0c7fc3013557e980c5c8beb7ed532381
parentf927bad415464ae52601a90a16efc40e5518f8f7
Handle a null lhs in expand_direct_optab_fn (PR85862)

This PR showed that the normal function for expanding directly-mapped
internal functions didn't handle the case in which the call was only
being kept for its side-effects.

2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>

gcc/
PR middle-end/85862
* internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.

gcc/testsuite/
PR middle-end/85862
* gcc.dg/torture/pr85862.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@260504 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/internal-fn.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr85862.c [new file with mode: 0644]