[LLVMbugs] [Bug 15029] New: Lambda function-pointer-conversion causes wrong code generation
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jan 22 01:08:51 PST 2013
http://llvm.org/bugs/show_bug.cgi?id=15029
Bug #: 15029
Summary: Lambda function-pointer-conversion causes wrong code
generation
Product: clang
Version: 3.2
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++11
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: antispam at idupree.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Clang happily compiles the following code. When the binary is run,
Observed behavior: receives SIGILL
Expected behavior: exit status 0
System: Linux x86_64 clang 3.2 (Arch Linux)
To test: clang++ -std=c++11 test.cpp && ./a.out
Code:
struct has_ctor_and_dtor {
has_ctor_and_dtor() {}
~has_ctor_and_dtor() {}
};
typedef has_ctor_and_dtor (*fptr)();
int main() {
const fptr func = []() {
return has_ctor_and_dtor();
};
func();
return 0;
}
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list