diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-12 08:35:08 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-07-12 08:35:08 +0000 |
commit | 12283fd1a41d715f9931df5160369041d57a5967 (patch) | |
tree | 1c25bbbb28ea5e9ea0d0aff626f0055039a3604f /gcc/lto-symtab.c | |
parent | c64333377e44daedd8001e5ae3f7082bd2c51042 (diff) | |
download | gcc-12283fd1a41d715f9931df5160369041d57a5967.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162070 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-symtab.c')
-rw-r--r-- | gcc/lto-symtab.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/lto-symtab.c b/gcc/lto-symtab.c index d1014497a54..7d4235053d3 100644 --- a/gcc/lto-symtab.c +++ b/gcc/lto-symtab.c @@ -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 |