https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117422
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to eczbek.void from comment #4) > Wow, very strange. Thanks for the workaround. Most likely what is happening is the 2 decls are merged early and then the template argument from the other decl is used instead of the new one which was just declared. This is why comment #2 is happening :).