On Tue, 10 Jul 2018 at 12:29, Klaus Rudolph <lts-rudolph@xxxxxx> wrote: > > I see that gcc emits for every function which uses cout a global constructor call is emitted, even if the function is removed later during link stage. I don't think it's true that it does it for every function. It does it once per translation unit, not once per function. Your test is misleading because you only have one function per TU.