[LLVMdev] llvm-gcc 4.2 assertion failed on linux x86_64

Duncan Sands
Thu, 27 Mar 2008 16:04:43 -0000

Does this fix it?

Index: lib/Target/X86/X86Subtarget.h
==================================================================---
lib/Target/X86/X86Subtarget.h	(revision 48879)
+++ lib/Target/X86/X86Subtarget.h	(working copy)
@@ -144,9 +144,12 @@

   std::string getDataLayout() const {
     const char *p;
-    if (is64Bit())
-      p = "e-p:64:64-s:64-f64:64:64-i64:64:64-f80:128:128";
-    else {
+    if (is64Bit()) {
+      if (isTargetDarwin())
+        p = "e-p:64:64-s:64-f64:64:64-i64:64:64-f80:128:128";
+      else
+        p = "e-p:64:64-s:64-f64:64:64-i64:64:64-f80:32:32";
+    } else {
       if (isTargetDarwin())
         p = "e-p:32:32-f64:32:64-i64:32:64-f80:128:128";
       else