[LLVMbugs] [Bug 143] [llvm-gcc] Illegal union field reference

bugzilla-daemon at zion.cs.uiuc.edu bugzilla-daemon at zion.cs.uiuc.edu
Thu Nov 20 12:58:28 PST 2003


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

sabre at nondot.org changed:

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



------- Additional Comments From sabre at nondot.org  2003-11-20 14:58 -------
Fixed.  Testcase: CFrontend/2003-11-20-UnionBitfield.c

Patch:
$ diff -u llvm-expand.c~ llvm-expand.c
--- llvm-expand.c~      2003-11-20 13:38:23.000000000 -0600
+++ llvm-expand.c       2003-11-20 14:54:50.000000000 -0600
@@ -4655,8 +4655,6 @@
        *  pointer to the desired type now.
        */
       if (ActualOffset == Offset && ResultElTy != FieldDeclTy) {
-        assert((ActualSize & 7) == 0 && (Size & 7) == 0 &&
-               "Illegal union field reference!");
         Result = cast_if_type_not_equal(Fn, Op0,
                                         llvm_type_get_pointer(FieldDeclTy));
         ResultElTy = GET_POINTER_TYPE_ELEMENT(Result->Ty);

-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