https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92077
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Looks like the "independent" function changes inlining decisions. Operator+ is not inlined when G is defined. This might be a heuristic issue of the translational unit growing too big with the inlining.