Re: [PATCH] c, v3: Fix ICE related to incomplete structures in C23 [PR114930]

2024-06-20 Thread Joseph Myers
On Thu, 20 Jun 2024, Jakub Jelinek wrote: > 2024-06-19 Jakub Jelinek > Martin Uecker > > PR c/114930 > PR c/115502 > gcc/c/ > * c-decl.cc (c_update_type_canonical): Assert t is main variant > with 0 TYPE_QUALS. Simplify and don't use check_qualified_type. >

[PATCH] c, v3: Fix ICE related to incomplete structures in C23 [PR114930]

2024-06-20 Thread Jakub Jelinek
Hi! Here is a version of the c_update_type_canonical fixes which passed bootstrap/regtest. The non-trivial part is the handling of the case when build_qualified_type (TYPE_CANONICAL (t), TYPE_QUALS (x)) returns a type with NULL TYPE_CANONICAL. That should happen only if TYPE_CANONICAL (t) == t, b