PR c++/82069 - ICE with lambda in template
[official-gcc.git] / gcc / testsuite / gcc.dg / pr67043.c
blob36aa68673f15ef1e768830ec1ce98fe7f0da0713
1 /* { dg-do compile } */
2 /* { dg-options "-O3 -fcompare-debug -w" } */
4 extern void rt_mutex_owner (void);
5 extern void rt_mutex_deadlock_account_lock (int);
6 extern void signal_pending (void);
7 __typeof__ (int *) a;
8 int b;
10 int
11 try_to_take_rt_mutex (int p1) {
12 rt_mutex_owner ();
13 if (b)
14 return 0;
15 rt_mutex_deadlock_account_lock (p1);
16 return 1;
19 void
20 __rt_mutex_slowlock (int p1) {
21 int c;
22 for (;;) {
23 c = ({
24 asm ("" : "=r"(a));
26 });
27 if (try_to_take_rt_mutex (c))
28 break;
29 if (__builtin_expect (p1 == 0, 0))
30 signal_pending ();