Re: [PATCH] c++: ICE with scoped enum in switch condition [PR114451]

2024-04-02 Thread Jason Merrill
On 3/29/24 18:31, Marek Polacek wrote: Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/13? OK. -- >8 -- Here we ICE when gimplifying enum class Type { Pawn }; struct Piece { Type type : 4; }; void foo() { switch (Piece().type) case Type::Pawn:; }

[PATCH] c++: ICE with scoped enum in switch condition [PR114451]

2024-03-29 Thread Marek Polacek
Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk/13? -- >8 -- Here we ICE when gimplifying enum class Type { Pawn }; struct Piece { Type type : 4; }; void foo() { switch (Piece().type) case Type::Pawn:; } because we ended up with TYPE_PRECISION (cond) < TYPE_PR