beetrees wrote:

Thanks for working on this. This PR correctly fixes the example given in 
#144709. However, this PR currently fails to correctly pass overaligned structs 
containing floating point fields. Consider the following example:

```c
struct Struct {
        _Alignas(16) long x;
        double y;
};

double f(long a, struct Struct b) {
        return b.y;
}
```

GCC will correctly pass `b.y` in `d6`, whereas this PR currently incorrectly 
passes `b.y` in `o3`.

This PR also breaks the ABI of `long double` when in a struct:
```c
struct Struct {
        long double x;
};

long double f(long a, struct Struct b) {
        return b.x;
}
```

GCC and current Clang will pass `b.x` in `q4`, whereas this PR currently 
incorrectly passes `b.x` in `o2` and `o3`.

https://github.com/llvm/llvm-project/pull/155829
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to