https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72708 --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think so. Static != internal linkage. If anything you found a defect in the C++ language.