SixWeining added a comment.

In D132285#3736922 <https://reviews.llvm.org/D132285#3736922>, @xry111 wrote:

> Are cases like
>
>   struct x { double a; __int128 : 0; double b;};
>   double f(struct x x) { return x.a + x.b; }
>
> handled properly?  AFAIK RISC-V clang currently does not handle it correctly:
>
> https://godbolt.org/z/rvM99zbqc (GCC handles it properly)
> https://godbolt.org/z/sWY5vs5ce (Clang does not handle it properly)
>
> Note that we rectified the ABI to match the behavior of RISC-V GCC 
> deliberately (https://gcc.gnu.org/r12-8294) but I didn't rewrite the document 
> because the behavior is not easy to describe with my poor English.

Thanks. Since current ABI doesn’t document the behavior of zero-bit fields so I 
pay less attention to this case. Let me check it later.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D132285

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

Reply via email to