https://bugs.llvm.org/show_bug.cgi?id=47836
Bug ID: 47836
Summary: [Windows][AArch64] Returning structures from functions
has wrong ABI
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: myriac...@gmail.com
CC: blitzrak...@gmail.com, dgre...@apple.com,
erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
richard-l...@metafoo.co.uk
Created attachment 24056
--> https://bugs.llvm.org/attachment.cgi?id=24056&action=edit
source files to reproduce
Clang++ has an incorrect ABI for Windows ARM64. When returning a non-POD type
from a function in Windows, the function is expected to return the hidden
destination pointer in X0. This will crash in certain scenarios when MSVC
compiles some translation units and Clang++ others.
This is equivalent to the following existing bug, but for ARM64 instead of
x86/x86-64. I have not checked ARM32 Windows.
https://bugs.llvm.org/show_bug.cgi?id=15556
clang-cl --target=arm64-pc-windows-msvc /c /MT /GS vectorbug-clang-side.cpp
cl /c /MT /GS vectorbug-msvc-side.cpp
link /DEBUG /OUT:vectorbug.exe vectorbug-msvc-side.obj vectorbug-clang-side.obj
libcmt.lib kernel32.lib
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs