https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110194
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Also -G and -g are different options. I was thinking you saying gcc should not warn when you specify the small data size on some targets (-G). Oh -g is independent from optimization level too.