https://bugs.llvm.org/show_bug.cgi?id=37612
Bug ID: 37612
Summary: member pointer to base member ignores base offset when
pointer is function-local and auto-typed.
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangb...@nondot.org
Reporter: xaxa...@gmail.com
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org
Created attachment 20348
--> https://bugs.llvm.org/attachment.cgi?id=20348&action=edit
code demonstrating bug
When a derived class's base class has a non-zero offset, a derived-class
pointer-to-member to a base-class member should include this offset. But when
the pointer-to-member is both auto-typed and defined inside a function, it
appears to ignore the base-class offset.
The attached code should produce "0" "0x4".
Clang++ produces: "0" "0".
GCC correctly produces: "0" "0x4".
I believe the base class offset is being treated as zero.
(To me, this is an unusually specific bug).
llvm/clang from trunk as of 2018/05/28, via git.
--
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