From b850dd2f0b0c10067114eb0320b167be2ac87d6c Mon Sep 17 00:00:00 2001 From: Marek Polacek Date: Wed, 7 Oct 2015 14:09:05 +0000 Subject: [PATCH] =?utf8?q?re=20PR=20sanitizer/67867=20(UBSan=20bootstrap?= =?utf8?q?=20fails=20with=20error:=20=E2=80=98otype=E2=80=99=20may=20be=20?= =?utf8?q?used=20uninitialized=20in=20this=20function=20[-Werror=3Dmaybe-u?= =?utf8?q?ninitialized])?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit PR sanitizer/67867 * search.c (accessible_p): Initialize OTYPE to NULL_TREE. From-SVN: r228569 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/search.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) 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 -- 2.30.2