Commit b850dd2f by Marek Polacek Committed by Marek Polacek

re PR sanitizer/67867 (UBSan bootstrap fails with error: ‘otype’ may be used…

re PR sanitizer/67867 (UBSan bootstrap fails with error: ‘otype’ may be used uninitialized in this function [-Werror=maybe-uninitialized])

	PR sanitizer/67867
	* search.c (accessible_p): Initialize OTYPE to NULL_TREE.

From-SVN: r228569
parent 1f3ccbc8
2015-10-07 Marek Polacek <polacek@redhat.com> 2015-10-07 Marek Polacek <polacek@redhat.com>
PR sanitizer/67867
* search.c (accessible_p): Initialize OTYPE to NULL_TREE.
2015-10-07 Marek Polacek <polacek@redhat.com>
* cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location. * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location.
(genericize_cp_loop): Likewise. (genericize_cp_loop): Likewise.
* decl.c (cxx_maybe_build_cleanup): Likewise. * decl.c (cxx_maybe_build_cleanup): Likewise.
......
...@@ -961,7 +961,7 @@ accessible_p (tree type, tree decl, bool consider_local_p) ...@@ -961,7 +961,7 @@ accessible_p (tree type, tree decl, bool consider_local_p)
&& (!processing_template_parmlist || processing_template_decl > 1)) && (!processing_template_parmlist || processing_template_decl > 1))
return 1; return 1;
tree otype; tree otype = NULL_TREE;
if (!TYPE_P (type)) if (!TYPE_P (type))
{ {
/* When accessing a non-static member, the most derived type in the /* When accessing a non-static member, the most derived type in the
......
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