PR debug/83084
[official-gcc.git] / gcc / testsuite / g++.dg / opt / pr83084.C
blobd21e30878ec282ecdc8d5004bdd841b1f6a65798
1 // PR debug/83084
2 // { dg-do compile }
3 // { dg-options "-O2 -fcompare-debug -Wno-return-type" }
5 enum E { F };
6 template <E = F> struct A {
7   bool foo ();
8   int b;
9 };
10 template <> bool A<>::foo () {
11   int a;
12   do
13     if (a)
14       return false;
15   while (__atomic_compare_exchange_n (&b, &a, 0, 1, 4, 0));