re PR sanitizer/67867 (UBSan bootstrap fails with error: ‘otype’ may be used uninitia...
authorMarek Polacek <polacek@redhat.com>
Wed, 7 Oct 2015 14:09:05 +0000 (14:09 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Wed, 7 Oct 2015 14:09:05 +0000 (14:09 +0000)
PR sanitizer/67867
* search.c (accessible_p): Initialize OTYPE to NULL_TREE.

From-SVN: r228569

gcc/cp/ChangeLog
gcc/cp/search.c

index 3c785451126f1b70520f1fe2a2c43a9cf87e14da..d465ef6a5e2e30ee611b7e9f7cfd4a0a869ffc0d 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 508e66c43bb37d0f40e0c7f5903dce94e37d6077..56bb266da310319721a8361d1820a0b37a3e541a 100644 (file)
@@ -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