1 /* PR target/70821 */ 2 /* { dg-do compile } */ 3 /* { dg-options "-Os" } */ 4 /* { dg-additional-options "-march=i686" { target ia32 } } */ 5 6 void bar (void); 7 8 void foo(int * p)9foo (int *p) 10 { 11 if (__atomic_sub_fetch (p, 1, __ATOMIC_SEQ_CST)) 12 bar (); 13 } 14 15 /* { dg-final { scan-assembler "lock;? dec" } } */ 16 /* { dg-final { scan-assembler-not "lock;? xadd" } } */ 17