https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67989
--- Comment #14 from ktkachov at gcc dot gnu.org --- Author: ktkachov Date: Tue Oct 27 14:07:04 2015 New Revision: 229443 URL: https://gcc.gnu.org/viewcvs?rev=229443&root=gcc&view=rev Log: [optabs.c] Fix PR 67989: Handle const0_rtx target in expand_atomic_compare_and_swap Backport from mainline 2015-10-26 Kyrylo Tkachov <kyrylo.tkac...@arm.com> 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. Added: branches/gcc-4_9-branch/gcc/testsuite/g++.dg/pr67989.C Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/optabs.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog