PR c++/71675 - __atomic_compare_exchange_n returns wrong type for typed enum
authorMartin Sebor <msebor@redhat.com>
Fri, 22 Jul 2016 18:32:08 +0000 (18:32 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 22 Jul 2016 18:32:08 +0000 (12:32 -0600)
commit2e6b45afba5f9606e6322e1a2b08b86971f38e92
treea853bd1f354648d922e4b463a253980804d5fdd2
parent22b955cca564a9a3a5b8c9d9dd1e295b7943c128
PR c++/71675 - __atomic_compare_exchange_n returns wrong type for typed enum

gcc/c-family/ChangeLog:

PR c++/71675
* c-common.c (resolve_overloaded_builtin): Avoid converting
__atomic_compare_exchange_n return type to that of what its
first argument points to.

gcc/testsuite/ChangeLog:

PR c++/71675
* g++.dg/ext/atomic-3.C: New test.
* gcc.dg/atomic/pr71675.c: New test.

From-SVN: r238664
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/atomic-3.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/atomic/pr71675.c [new file with mode: 0644]