https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66009
--- Comment #4 from Jeffrey A. Law <law at redhat dot com> --- Hahaha, finally figured out what was going on here. The definition of types_match and single_use violate the C++ ODR in a non-optimizing compilation (ie, then they do not get inlined). There'll be two implementations of each function -- with different semantics and the linker will just pick one willy-nilly. Easily fixed by making them static inlines. Doh!