[optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Mon, 26 Oct 2015 10:28:12 +0000 (10:28 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Mon, 26 Oct 2015 10:28:12 +0000 (10:28 +0000)
commitf8ac2f077a4a36e3a7c54b289ef4a4ada15af357
tree426eb71f12eed0495b4e17dcb79040d32e2822f5
parent8c14315a0de2a70121941f646942a476767fad4e
[optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap

PR middle-end/67989
* optabs.c (expand_atomic_compare_and_swap): Handle case when
ptarget_oval or ptarget_bool are const0_rtx.

* g++.dg/pr67989.C: New test.

From-SVN: r229317
gcc/ChangeLog
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr67989.C [new file with mode: 0644]