lto-symtab.c (lto_symtab_merge_decls_1): Use fatal_error instead of gcc_assert to...
authorAndi Kleen <ak@linux.intel.com>
Mon, 12 Jul 2010 08:35:08 +0000 (08:35 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 12 Jul 2010 08:35:08 +0000 (08:35 +0000)
2010-07-12  Andi Kleen  <ak@linux.intel.com>

        * lto-symtab.c (lto_symtab_merge_decls_1): Use fatal_error
        instead of gcc_assert to print better error message for
        multiple prevailing defs.

From-SVN: r162070

gcc/ChangeLog
gcc/lto-symtab.c

index 14527ac03ea8605658f77e3c34dc468870d59657..e1322b191169b34d58791361aff064a318977500 100644 (file)
@@ -1,3 +1,9 @@
+2010-07-12  Andi Kleen  <ak@linux.intel.com>
+
+       * lto-symtab.c (lto_symtab_merge_decls_1): Use fatal_error
+       instead of gcc_assert to print better error message for multiple
+       prevailing defs.
+
 2010-07-12  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.c (ix86_asm_output_function_label): Change format
index d1014497a54dcd0d9c53ce203cb6acbd7c93198c..7d4235053d3fbc24b49495b61bbc5a85fbf868e8 100644 (file)
@@ -649,8 +649,12 @@ lto_symtab_merge_decls_1 (void **slot, void *data ATTRIBUTE_UNUSED)
   /* Assert it's the only one.  */
   if (prevailing)
     for (e = prevailing->next; e; e = e->next)
-      gcc_assert (e->resolution != LDPR_PREVAILING_DEF_IRONLY
-                 && e->resolution != LDPR_PREVAILING_DEF);
+      {
+       if (e->resolution == LDPR_PREVAILING_DEF_IRONLY
+           || e->resolution == LDPR_PREVAILING_DEF)
+         fatal_error ("multiple prevailing defs for %qE",
+                      DECL_NAME (prevailing->decl));
+      }
 
   /* If there's not a prevailing symbol yet it's an external reference.
      Happens a lot during ltrans.  Choose the first symbol with a