https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69841
James Greenhalgh <jgreenhalgh at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |jgreenhalgh at gcc dot gnu.org --- Comment #2 from James Greenhalgh <jgreenhalgh at gcc dot gnu.org> --- At the heart of the problem, the compiler has decided that the second parameter to this templated function has an overaligned member (64-byte aligned in f2, 8-byte aligned in f1). This gives different parameter passing rules, and you get the code difference above. I haven't figured out what causes the alignment to differ between the two TUs, or why the compiler feels it is safe to propagate the alignment information without specializing the function name. I'll take the bug while I look deeper.