Re: [PATCH] c++: ICE with -Wlogical-op [PR107755]

2023-01-31 Thread Jason Merrill via Gcc-patches
On 1/31/23 15:41, Marek Polacek wrote: Here we crash in the middle end because warn_logical_operator calls build_range_check which calls various fold_* functions and those don't work too well when we're still processing template trees. For instance here we crash because we're converting a RECORD

[PATCH] c++: ICE with -Wlogical-op [PR107755]

2023-01-31 Thread Marek Polacek via Gcc-patches
Here we crash in the middle end because warn_logical_operator calls build_range_check which calls various fold_* functions and those don't work too well when we're still processing template trees. For instance here we crash because we're converting a RECORD_TYPE to bool. At this point VIEW_CONVERT