https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121478
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |13.1.0, 14.3.0, 15.1.0 Status|UNCONFIRMED |NEW Last reconfirmed| |2025-08-09 Summary|[ICE] internal compiler |ICE in fold_convert_loc due |error: in fold_convert_loc, |to null pointer type |at fold-const.cc:2670 | Ever confirmed|0 |1 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Confirmed. The front-end exposes nullptr_type to the middle-end for comparisons. if (nullp_27(D) == 0) this should always optimized to just true. But I am not 100% sure if this is a front-end issue or a gimple one. `-O2 -funswitch-loops` is enough to reproduce it. I can't figure out what goes wrong with unswitching the loop dealing with that if statement too.