* varasm.c (notice_global_symbol): Discard external symbols.
PR optimization/12286
* gcov-io.c (gcov_read_words): Fix memmove call.
* profile.c (compute_branch_probabilities): Add extra sanity checks.
PR C++/12047
* except.c (build_eh_type_type): Call mark_used on the type.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71916
138bc75d-0d04-0410-961f-
82ee72b054a4
+Mon Sep 29 22:59:05 CEST 2003 Jan Hubicka <jh@suse.cz>
+
+ PR c++/12175
+ * varasm.c (notice_global_symbol): Discard external symbols.
+
+ PR optimization/12286
+ * gcov-io.c (gcov_read_words): Fix memmove call.
+ * profile.c (compute_branch_probabilities): Add extra sanity checks.
+
2003-09-29 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config.gcc (sparc-*-solaris2*): Handle Solaris 10 and up like
+2003-09-29 Jan Hubicka <jh@suse.cz>
+
+ PR C++/12047
+ * except.c (build_eh_type_type): Call mark_used on the type.
+
2003-09-28 Richard Henderson <rth@redhat.com>
* typeck.c (c_expand_asm_operands): Take location_t, instead of
if (!exp)
return NULL;
+ mark_used (exp);
+
return build1 (ADDR_EXPR, ptr_type_node, exp);
}
memcpy (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, 4);
}
#else
- memmove (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, excess);
+ memmove (gcov_var.buffer, gcov_var.buffer + gcov_var.offset, excess * 4);
#endif
gcov_var.offset = 0;
gcov_var.length = excess;
gcov_type *exec_counts = get_exec_counts ();
int exec_counts_pos = 0;
+ /* Very simple sanity checks so we catch bugs in our profiling code. */
+ if (profile_info)
+ {
+ if (profile_info->run_max * profile_info->runs < profile_info->sum_max)
+ {
+ error ("corrupted profile info: run_max * runs < sum_max");
+ exec_counts = NULL;
+ }
+
+ if (profile_info->sum_all < profile_info->sum_max)
+ {
+ error ("corrupted profile info: sum_all is smaller than sum_max");
+ exec_counts = NULL;
+ }
+ }
+
/* Attach extra info block to each bb. */
alloc_aux_for_blocks (sizeof (struct bb_info));
if (exec_counts)
{
e->count = exec_counts[exec_counts_pos++];
+ if (e->count > profile_info->sum_max)
+ {
+ error ("corrupted profile info: edge from %i to %i exceeds maximal count",
+ bb->index, e->dest->index);
+ }
}
else
e->count = 0;
{
if ((!first_global_object_name || !weak_global_object_name)
&& TREE_PUBLIC (decl) && !DECL_COMMON (decl)
+ && !DECL_EXTERNAL (decl)
&& (TREE_CODE (decl) == FUNCTION_DECL
|| (TREE_CODE (decl) == VAR_DECL
&& (DECL_INITIAL (decl) != 0