https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77546
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks like an inlining difference: bl 418118 <Vector3::length()> So please supply the preprocessed source which instantiates: unsigned int IlluminatePixel<FatPointPhongAndSoftShadowed, TriangleCarrier<FatPointPhongAndSoftShadowed> >(FatPointPhongAndSoftShadowed const &, TriangleCarrier<FatPointPhongAndSoftShadowed> const&, Scene const&, SDL_Surface*)