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

           Summary: miscompilation of union { long double }
           Product: clang
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


clang miscompiles the following:
--
ddun...@lordcrumb:return-types$ cat fail.c
#include <stdio.h>
typedef union T0 { long double field0; } T0;
static T0 T0_values[] = {
        { (long double) 32 },
        { (long double) 32 },
};
int main(int argc, char **argv) {
  printf("  fn424_RV: RV.field0 = %d\n", T0_values[1].field0 == (long double)
32);
  return 0;
}
ddun...@lordcrumb:return-types$ for x in gcc xcc; do echo "-- $x --"; $x
-std=c99 -m64 fail.c && ./a.out; done
-- gcc --
  fn424_RV: RV.field0 = 1
-- xcc --
  fn424_RV: RV.field0 = 0
--


-- 
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