You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
__attribute__((__noreturn__)) is miscompiled upstream.
See https://godbolt.org/z/T6nMoa75G from Miguel Young and his comment.
When using the standard [[noreturn]] and _Noreturn in their respective languages, codegen is identical, and correct. The C codegen is obviously wrong and clearly confusing the hell out of LLVM, as evidenced by this instruction sequence:
jne .LBB1_1
mov rax, qword ptr [rip + baz@GOTPCREL]
call rax
.LBB1_1: mov rax, qword ptr [rip + foo@GOTPCREL] call rax
(Just do call foo@PLT?)
My recommendation is that upstream use _Noreturn, or noreturn + <stdnoreturn.h>. Clang is clearly able to get this right, but somehow left hand isn't talking to right hand in the unification algorithm.
(This really isn't a C v. C++ difference at all; both languages define their standard noreturn primitives identically.)
The text was updated successfully, but these errors were encountered:
__attribute__((__noreturn__))
is miscompiled upstream.See https://godbolt.org/z/T6nMoa75G from Miguel Young and his comment.
The text was updated successfully, but these errors were encountered: