AmrDeveloper wrote:

> Hmm. Since this is an IBM / GCC extension, I would normally ask what GCC 
> thinks the type of `__real(a)` is. But GCC actually appears to accept 
> `&__real(a)`, which cannot be correctly implemented, so clearly this is just 
> not carefully tested, which is not too surprising for an extension.
> 
> I would say that `__real`/`__imag` applied to an atomic type should just 
> force lvalue conversion on the operand, which will strip the atomic type. 
> `__real(a) = r;` is theoretically implementable but I don't see any urgency 
> to do it.
> 
> More generally, I think it's extremely regrettable that C requires atomic 
> types to exist as r-value types at all, but it may just be something we have 
> to live with.

Thanks for the explanation :D, I will focus on the two crashes and then test 
more cases with atomics 🙏🏻  

https://github.com/llvm/llvm-project/pull/172163
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to