Hi Jason, Jason Merrill writes: > On 12/10/22 08:13, Arsen Arsenović wrote: >> If the mangler is relied on, functions with extern "C" on them emit multiple >> definitions of the same name. > > But doing it here interferes with lazy mangling. How about appending the > suffix into write_mangled_name instead of write_encoding? The demangler > already expects "clone" suffixes at the end of the mangled name. Ah, sorry. I'm not well versed in the mangler code, so I didn't realize (frankly, I was initially surprised when I saw that DECL_ASSEMBLER_NAME was set that early, but went with it). That makes sense. How about this? Tested on x86_64-pc-linux-gnu via check-g++.