From: Marek Polacek Date: Wed, 7 Oct 2015 14:09:05 +0000 (+0000) Subject: re PR sanitizer/67867 (UBSan bootstrap fails with error: ‘otype’ may be used uninitia... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b850dd2f0b0c10067114eb0320b167be2ac87d6c;p=gcc.git 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 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 3c785451126..d465ef6a5e2 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2015-10-07 Marek Polacek + + PR sanitizer/67867 + * search.c (accessible_p): Initialize OTYPE to NULL_TREE. + 2015-10-07 Marek Polacek * cp-gimplify.c (genericize_if_stmt): Use protected_set_expr_location. diff --git a/gcc/cp/search.c b/gcc/cp/search.c index 508e66c43bb..56bb266da31 100644 --- a/gcc/cp/search.c +++ b/gcc/cp/search.c @@ -961,7 +961,7 @@ accessible_p (tree type, tree decl, bool consider_local_p) && (!processing_template_parmlist || processing_template_decl > 1)) return 1; - tree otype; + tree otype = NULL_TREE; if (!TYPE_P (type)) { /* When accessing a non-static member, the most derived type in the