[clang] [CodeGen] Add TBAA struct path info for array members (PR #137719)

Bruno De Fraine via cfe-commits cfe-commits at lists.llvm.org
Thu May 22 04:02:05 PDT 2025


brunodf-snps wrote:

Hm, I was still adding test cases involving may_alias, but I still found problems with the following:

```
typedef int __attribute__((may_alias)) aliasing_int;
typedef int __attribute__((may_alias)) aliasing_array[10];
struct E { aliasing_int x[4]; aliasing_array y; };
```

Both `e->x[i]` and `e->y[j]` fail in the IR verifier because of a mismatch between the access type and the type of the member in the type node of E (the access type is "int" and the member type is "omnipotent char" or vice versa).

https://github.com/llvm/llvm-project/pull/137719


More information about the cfe-commits mailing list