Ok, so something seems like really broken on my side
It doesn't show the message at all in a "blank project" (neither GUI nor console) - see attachment for GUI project.
OS? 32/64 bit? - Win10x64. I'm almost sure I've had the same issue in Debian12x64, but didn't pay too much attention.
Optimization settings? - Different, usually the "default" Debug mode (the one created in Project Settings). However, now that I think about it the error message in the first post was inside of a LPK, most likely Castle Game Engine (can double check if needed, can be deeper, in FPC's DOM unit), as far as I know the packages use their own optimization settings, and if I read it correctly it should be
-O2.
FPC version? - Trunk, around a month or two old.
Custom FPC build? - installed from FPCUpDeluxe.