Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/pr67043.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* { dg-do compile } */ /* { dg-options "-O3 -fcompare-debug -w" } */ extern void rt_mutex_owner (void); extern void rt_mutex_deadlock_account_lock (int); extern void signal_pending (void); __typeof__ (int *) a; int b; int try_to_take_rt_mutex (int p1) { rt_mutex_owner (); if (b) return 0; rt_mutex_deadlock_account_lock (p1); return 1; } void __rt_mutex_slowlock (int p1) { int c; for (;;) { c = ({ asm ("" : "=r"(a)); a; }); if (try_to_take_rt_mutex (c)) break; if (__builtin_expect (p1 == 0, 0)) signal_pending (); } }