Issue 183723
Summary [Clang] ABI mismatch between Clang and GCC when using vector types in a union
Labels clang, ABI, diverges-from:gcc
Assignees
Reporter philnik777
    ```c++
template <class T, int N>
using vec [[gnu::vector_size(N * sizeof(T))]] = T;

union S {
  vec<int, 16> v;
  vec<int, 4> w[4];
};

S test() {
  return S{};
}
```
Clang and GCC disagree on whether the above code passes `S` in a register or on the stack.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to