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: kparz...@codeaurora.org
          Reporter: richard-l...@metafoo.co.uk
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to