jonpa added a comment.

In D143813#4256969 <https://reviews.llvm.org/D143813#4256969>, @ahatanak wrote:

> I think this patch is causing the assertion in 
> `CodeGenFunction::setAddrOfLocalVar` to fail when the following code is 
> compiled:
>
>   void foo(unsigned long long t) {
>     __sync_bool_compare_and_swap(({int x = 1; &t;}), t, t);
>   }
>
> Could you take a look?

I don't understand the first argument - I thought it was supposed to be just an 
address...

This patch seems to (in CheckAtomicAlignment()) call 
CGF.EmitPointerWithAlignment() on the CompoundStmt, which is unexpected. If 
this is a legal parameter for the address, I guess there should be some kind of 
special handling here. Perhaps it would be ok to only emit the warning for 
plain address paramters, I might think...?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143813/new/

https://reviews.llvm.org/D143813

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to