[LLVMbugs] [Bug 9565] New: clang c++ bad codegen with const reference?
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 25 21:17:58 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=9565
Summary: clang c++ bad codegen with const reference?
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
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:
#include <cstdio>
struct a { int a : 10, b : 10; };
static a x;
const int &y = x.a;
int main() { x.b = 100; printf("%d\n", y); }
As far as I can tell, this is supposed to print "0"; however, it currently
prints "102400". Testcase written because I was curious; probably no
real-world code does this.
--
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