Re: [C PATCH]: fix checking ICE on pointer to a VLA of a tagged type [PR126284]

Joseph Myers <[email protected]>
Newsgroups gmane.comp.gcc.patches
Message-ID <[email protected]>
On Sun, 19 Jul 2026, Martin Uecker wrote:

> Bootstrapped and regression tested on x86_64.
> 
> 
>     c: fix checking ICE on pointer to a VLA of a tagged type [PR126284]
>     
>     Remove the check for complete types in top_array_vla_p because
>     it is incorrect and we may end up encountering an array with
>     incomplete element type in c_verify_type.  This can happen by
>     replacing structures or unions with their incomplete version when
>     constructing the canonical type.
>     
>             PR c/126284
>     
>     gcc/c/ChangeLog:
>             * c-typeck.cc (top_array_vla_p): Remove check.
>     
>     gcc/testsuite/ChangeLog:
>             * gcc.dg/pr126284.c: New test.

OK.

-- 
Joseph S. Myers
[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.