// PR c++/71675 - __atomic_compare_exchange_n returns wrong type for typed enum // { dg-do compile { target c++11 } } template void sink (T); bool sink (bool); template bool test () { enum class E: T { }; static E e; return sink (__atomic_compare_exchange_n (&e, &e, e, false, 0, 0)); } void tests () { // __atomic_compare_exchange_n would fail to return bool when // its arguments were one of the three character types. test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); test(); }