[LLVMbugs] [Bug 10944] New: Rejects-valid/potential miscompile in edge case with templates and initializer-list
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Sep 16 14:59:22 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10944
Summary: Rejects-valid/potential miscompile in edge case with
templates and initializer-list
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: sharparrow1 at yahoo.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
Testcase:
struct X { int a, b; };
template<typename T> int foo(T x) {
X i[] = { 1, x, { 3, 4 } };
return sizeof(i);
}
void g() { X i = { 1, 2 }; foo(i); }
This code is valid, but clang rejects it. More complicated cases involving
conversion operators could be miscompiled.
--
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