https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92077
--- Comment #2 from Marc Glisse ---
It is quite natural for the compiler to inline functions that are only called
once (it won't take more space) (although the compiler doesn't actually know
that the function isn't also called in another TU) more
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92077
--- Comment #1 from Andrew Pinski ---
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.