https://bugs.llvm.org/show_bug.cgi?id=46764
Bug ID: 46764
Summary: Mangled names involving inline function incomplete
local types lack discriminators
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected],
[email protected]
void e(void(*)());
template<class> void f() {}
inline void g() {
if (1)
e(&f<struct S>);
if (1)
e(&f<struct S>);
}
void (*p)() = &g;
generates:
_Z1gv: # @_Z1gv
push rax
mov edi, offset _Z1fIZ1gvE1SEvv
call _Z1ePFvvE
mov edi, offset _Z1fIZ1gvE1SEvv
pop rax
jmp _Z1ePFvvE # TAILCALL
_Z1fIZ1gvE1SEvv: # @_Z1fIZ1gvE1SEvv
ret
p:
.quad _Z1gv
If 'inline' is removed the second 'S' is correctly assigned a discriminator,
giving _Z1fIZ1gvE1S_0Evv.
gcc compiles correctly (since 6.1).
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs