[llvm-bugs] [Bug 47836] New: [Windows][AArch64] Returning structures from functions has wrong ABI
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Oct 13 15:47:36 PDT 2020
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: unassignedclangbugs at nondot.org
Reporter: myriachan at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201013/2c6897a5/attachment.html>
More information about the llvm-bugs
mailing list