global_asm!
issues LLVM error "undefined temporary symbol" for non-existent numerical labels
#140179
Labels
A-global-asm
Area: `global_asm!`
C-discussion
Category: Discussion or questions that doesn't represent real issues.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
I've found that if I place undefined local numeric labels in a
global_asm!
block, thatrustc
will yield an LLVM (?) errorerror: Undefined temporary symbol .Ltmp0
, presumably as the numeric label is replaced with a temporary symbol.Ltmp0
.Here's a minimum viable example:
(Playground link: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=ddb9a35af1ac6a0c4d3a145253605252)
Notably, changing the label to a (global) text label as in the following doesn't cause any error to be issued.
I wasn't sure if this is something that would fall into the purview of Rust to handle with a more direct error message, but wanted to raise it as a potential issue since I'd expect either (a) no error message as in the case of the global label or (b) a typical
rustc
error message indicating where in the code the issue lies.Meta
rustc --version --verbose
:Also verified with nightly:
The text was updated successfully, but these errors were encountered: