https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69318
tbsaunde at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tbsaunde at gcc dot gnu.org --- Comment #2 from tbsaunde at gcc dot gnu.org --- So, the direct cause is that we have two symbols _Z18IndirectExternCallIPFviiEiEvT_T0_S3_ one for each of the template instantiations. Now the interesting bit is that if you compile this code as g++ test.cc -m32 -fabi-version=7 (note there is no -Wabi=N) then you get cc1plus: error: ‘void IndirectExternCall(F, T, T) [with F = void (__attribute__((stdcall, regparm(3))) *)(int, int); T = int]’ conflicts with a previous declaration test.cc:4:6: note: previous declaration ‘void IndirectExternCall(F, T, T) [with F = void (*)(int, int); T = int]’ void IndirectExternCall(F f, T t1, T t2) { // { dg-warning "mangled name" } ^~~~~~~~~~~~~~~~~~ test.cc:4:6: note: a later -fabi-version= (or =0) avoids this error with a change in mangling which is a rather laime error, but at least it isn't an ICE I guess. if you compile it as g++ test.cc -m32 -fabi-version=7 -fabi-compat-version=8 then you get the same ICE as with -Wabi=8 So I suspect somehow the aliases from -fabi-compat-version are preventing us from just erroring out.