[llvm-bugs] [Bug 33009] New: hexagon calling convention lowering miscompiles passing empty classes in C++
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu May 11 14:31:18 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=33009
Bug ID: 33009
Summary: hexagon calling convention lowering miscompiles
passing empty classes in C++
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: LLVM Codegen
Assignee: kparzysz at codeaurora.org
Reporter: richard-llvm at metafoo.co.uk
CC: llvm-bugs at lists.llvm.org
Testcase:
#include <stdio.h>
#define DUMP(ptr) printf("%s %p\\n", __PRETTY_FUNCTION__, ptr)
struct A {
A() { DUMP(this); }
A(const A&) { DUMP(this); }
~A() { DUMP(this); }
};
void f(A a) { DUMP(&a); }
int main() { f(A()); }
Note that the address of the A object within f is not the address of an object
for which a constructor or destructor is ever run. f is lowered to a
zero-argument LLVM function.
--
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/20170511/76ec9d60/attachment.html>
More information about the llvm-bugs
mailing list