[LLVMbugs] [Bug 128] [llvmg++] Cannot use pointer to member to initialize global
bugzilla-daemon at zion.cs.uiuc.edu
bugzilla-daemon at zion.cs.uiuc.edu
Tue Nov 18 12:28:19 PST 2003
http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=128
sabre at nondot.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
------- Additional Comments From sabre at nondot.org 2003-11-18 14:28 -------
Fixed.
Testcase here:
test/Regression/C++Frontend/2003-11-18-PtrMemConstantInitializer.cpp
Patched like so:
$ diff -u llvm-expand.c~ llvm-expand.c
--- llvm-expand.c~ 2003-11-18 00:23:07.000000000 -0600
+++ llvm-expand.c 2003-11-18 14:22:13.000000000 -0600
@@ -4302,6 +4302,11 @@
llvm_type *Ty = llvm_type_get_from_tree(TREE_TYPE(exp));
llvm_value *Val = 0;
+ /* If this is a front-end specific constant, like a PTRMEM_CST, expand it to
+ * primitives first.
+ */
+ exp = lang_hooks.expand_constant(exp);
+
switch (TREE_CODE(exp)) {
case INTEGER_CST: { /* Integer constant */
HOST_WIDE_INT HI = (unsigned HOST_WIDE_INT)TREE_INT_CST_HIGH(exp);
-Chris
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
More information about the llvm-bugs
mailing list