On Mon, 11 May 2026, Martin Uecker wrote:

> So, annoyingly, I got this wrong.
> 
> Bootstrapped and regression tested on x86_64.
> 
> Best,
> Martin
> 
> 
>     c23: fix TBAA error for function returning structure [PR125252]
>     
>     To fix PR122572 we globbed pointers to structure or union types nested
>     within other structure or union types to a void pointer when computing
>     the TYPE_CANONICAL.  But when doing this for function return types this
>     then leads to wrong aliasing decisions, because for some reason function
>     derivation behaves differently than pointer and array derivation.  Instead
>     of globbing to void, replace the nested structure or union type with an
>     incomplete type instead.
>     
>             PR c/124252
>     
>     gcc/c/ChangeLog:
>     
>             * c-typeck.cc (ptr_to_tagged_member): Return type of member.
>             (c_type_canonical): Use incomplete type.
>     
>     gcc/testsuite/ChangeLog:
>     
>             * gcc.dg/pr125252.c

OK.

-- 
Joseph S. Myers
[email protected]

Reply via email to