[optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap
commit5da065098ec237aa7e4883ba06b20cb8f0ff2cf4
authorktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Oct 2015 10:28:12 +0000 (26 10:28 +0000)
committerktkachov <ktkachov@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 26 Oct 2015 10:28:12 +0000 (26 10:28 +0000)
tree426eb71f12eed0495b4e17dcb79040d32e2822f5
parent44d567c8dc10de1abf5118ebf0f16dba1dc25fbe
[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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229317 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/optabs.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/pr67989.C [new file with mode: 0644]