Commit 97ce54b9 by Richard Guenther Committed by Richard Biener

re PR lto/46808 (Too verbose diagnostic messages when compiling with LTO)

2010-12-10  Richard Guenther  <rguenther@suse.de>

	PR lto/46808
	* lto-symtab.c (lto_symtab_merge_decls_2): Avoid type warnings
	after errors.
	(lto_symtab_merge_decls_1): Adjust.

From-SVN: r167690
parent d479b128
2010-12-10 Richard Guenther <rguenther@suse.de>
PR lto/46808
* lto-symtab.c (lto_symtab_merge_decls_2): Avoid type warnings
after errors.
(lto_symtab_merge_decls_1): Adjust.
2010-12-10 Dave Korn <dave.korn.cygwin@gmail.com> 2010-12-10 Dave Korn <dave.korn.cygwin@gmail.com>
PR middle-end/46674 PR middle-end/46674
...@@ -593,16 +593,16 @@ found: ...@@ -593,16 +593,16 @@ found:
} }
/* Merge all decls in the symbol table chain to the prevailing decl and /* Merge all decls in the symbol table chain to the prevailing decl and
issue diagnostics about type mismatches. */ issue diagnostics about type mismatches. If DIAGNOSED_P is true
do not issue further diagnostics.*/
static void static void
lto_symtab_merge_decls_2 (void **slot) lto_symtab_merge_decls_2 (void **slot, bool diagnosed_p)
{ {
lto_symtab_entry_t prevailing, e; lto_symtab_entry_t prevailing, e;
VEC(tree, heap) *mismatches = NULL; VEC(tree, heap) *mismatches = NULL;
unsigned i; unsigned i;
tree decl; tree decl;
bool diagnosed_p = false;
/* Nothing to do for a single entry. */ /* Nothing to do for a single entry. */
prevailing = (lto_symtab_entry_t) *slot; prevailing = (lto_symtab_entry_t) *slot;
...@@ -612,7 +612,8 @@ lto_symtab_merge_decls_2 (void **slot) ...@@ -612,7 +612,8 @@ lto_symtab_merge_decls_2 (void **slot)
/* Try to merge each entry with the prevailing one. */ /* Try to merge each entry with the prevailing one. */
for (e = prevailing->next; e; e = e->next) for (e = prevailing->next; e; e = e->next)
{ {
if (!lto_symtab_merge (prevailing, e)) if (!lto_symtab_merge (prevailing, e)
&& !diagnosed_p)
VEC_safe_push (tree, heap, mismatches, e->decl); VEC_safe_push (tree, heap, mismatches, e->decl);
} }
if (VEC_empty (tree, mismatches)) if (VEC_empty (tree, mismatches))
...@@ -751,12 +752,7 @@ lto_symtab_merge_decls_1 (void **slot, void *data ATTRIBUTE_UNUSED) ...@@ -751,12 +752,7 @@ lto_symtab_merge_decls_1 (void **slot, void *data ATTRIBUTE_UNUSED)
/* Merge the chain to the single prevailing decl and diagnose /* Merge the chain to the single prevailing decl and diagnose
mismatches. */ mismatches. */
lto_symtab_merge_decls_2 (slot); lto_symtab_merge_decls_2 (slot, diagnosed_p);
/* Drop all but the prevailing decl from the symtab. */
if (TREE_CODE (prevailing->decl) != FUNCTION_DECL
&& TREE_CODE (prevailing->decl) != VAR_DECL)
prevailing->next = NULL;
/* Store resolution decision into the callgraph. /* Store resolution decision into the callgraph.
In LTRANS don't overwrite information we stored into callgraph at In LTRANS don't overwrite information we stored into callgraph at
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment