[LLVMbugs] [Bug 152] The llvm-g++ program crashes on enum assertion

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Tue Nov 25 16:22:03 PST 2003


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=152

sabre at nondot.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From sabre at nondot.org  2003-11-25 18:22 -------
Fixed.  Here's the patch:

]$ diff -u llvm-expand.c~ llvm-expand.c
--- llvm-expand.c~      2003-11-25 02:38:39.000000000 -0600
+++ llvm-expand.c       2003-11-25 18:19:27.000000000 -0600
@@ -3505,7 +3505,7 @@
     /* Store each element of the constructor into the corresponding element of
        TARGET, determined by counting the elements.  */
     for (elt = CONSTRUCTOR_ELTS (exp); elt; elt = TREE_CHAIN (elt)) {
-      tree value = TREE_VALUE (elt);
+      tree value = lang_hooks.expand_constant(TREE_VALUE(elt));
       tree index = TREE_PURPOSE (elt);
 
       if (index && TREE_CODE(index) == RANGE_EXPR) {

I didn't check in a testcase, because I was able to fix this without reducing
the program.

-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