[Bug jit/96067] __atomic_compare_exchange_n should return bool instead of void

bouanto at zoho dot com gcc-bugzilla@gcc.gnu.org
Mon Jul 6 12:13:06 GMT 2020


--- Comment #2 from Antoni <bouanto at zoho dot com> ---
Created attachment 48835
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48835&action=edit
Reproducer for thebug

Here's a reproducer for the bug.
The doc says it should return bool
(https://gcc.gnu.org/onlinedocs/gcc/_005f_005fatomic-Builtins.html), but this
reproducer shows the following error:

libgccjit.so: error: gcc_jit_block_end_with_return: mismatching types: return
of __atomic_compare_exchange_n ((&var), (&var), (int)0, (bool)0, (int)0,
(int)0) (type: void) in function hello (return type: bool)

More information about the Gcc-bugs mailing list