* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / tm / pr45940-2.C
blobab10c34baaac997aa963f3470c55fa659ceaac3a
1 // { dg-do compile }
2 // { dg-options "-fgnu-tm -O1" }
4 __attribute__((transaction_pure))
5 inline int atomic_exchange_and_add(int dv )
7     int r;
8     __asm__ ("" : "=r"(r));
9     return r;
12 class sp_counted_base
14 public:
15     __attribute__((transaction_safe))
16     void release()
17     {
18         if( atomic_exchange_and_add(-1 ) == 1 )
19         {
20         }
21     }
24 sp_counted_base *base;
26 void here(){
27   __transaction_atomic {
28     base->release();
29   }