Skip to content

Commit c650ea2

Browse files
committed
Use local label in naked function to avoid collisions
This status-quo ante of this naked function test defined a label with the symbolic name `.L7`. However, changes to the stack could cause a collision with that same symbolic name being defined by compiler- generated code; therefore we use a local label instead to guarantee collision avoidance.
1 parent 3acda18 commit c650ea2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/ui/c-variadic/naked.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ unsafe extern "sysv64" fn c_variadic_sysv64(_: ...) -> Data {
1515
" sub rsp, 96",
1616
" mov QWORD PTR [rsp-88], rdi",
1717
" test al, al",
18-
" je .L7",
18+
" je 0f",
1919
" movaps XMMWORD PTR [rsp-40], xmm0",
20-
".L7:",
20+
"0:",
2121
" lea rax, [rsp+104]",
2222
" mov rcx, QWORD PTR [rsp-40]",
2323
" mov DWORD PTR [rsp-112], 0",

0 commit comments

Comments
 (0)