aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/torture/builtin-self.c
blob: 6d1719f7517d9c5268b73686109c9b119e67d7b5 (plain)
1
2
3
4
5
6
7
8
9
10
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
/* Check that we can use this idiom to define out-of-line copies of built-in
   functions.  This is used by libgcc/sync.c, for example.  */
void __sync_synchronize (void)
{
  __sync_synchronize ();
}
/* { dg-final { scan-assembler "__sync_synchronize" } } */
/* { dg-final { scan-assembler "\t(lock|mfence)" } } */
/* { dg-final { scan-assembler-not "\tcall" } } */