http://llvm.org/bugs/show_bug.cgi?id=3510

           Summary: llvm-gcc miscompiles simple static init in -m64
           Product: tools
           Version: 2.2
          Platform: PC
        OS/Version: All
            Status: NEW
          Keywords: miscompilation
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


llvm-gcc miscompiles this at -m64, not properly aligning the "1":
struct ty { 
  int info;
  union {
    int id;
    char *str;
  } u;
};

struct ty vals  = { 101,  1 };

$ llvm-gcc t4.c -S -o - -m64
_vals:                          ## vals
        .long   101                     ## 0x65
        .long   1                       ## 0x1
        .space  4
        .space  4

$ gcc t4.c -S -o - -m64
_vals:
        .long   101
        .space 4
        .long   1
        .space 4


-- 
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to