C   70

MP+rel_con

Guest on 20th July 2022 07:08:58 AM

  1. int main() {
  2.   int x = 0; int z; atomic_address y = &z;
  3.   {{{ { x=1;
  4.         y.store(&x,memory_order_release); }
  5.   ||| { int  q; int * p;
  6.         p =  y.load(memory_order_consume);
  7.         q = * p;
  8.         printf("%d\n", q.readsvalue(0)); }  
  9.   }}}
  10.   return 0;
  11. }

Raw Paste


Login or Register to edit or fork this paste. It's free.