On 10/13/2016 12:20 PM, Jakub Jelinek wrote:

both relied on TREE_PUBLIC be actually false for LABEL_DECLs, because
otherwise they have code later on that can't handle LABE_DECLs (plus callers
also not expecting LABEL_DECLs might not bind locally or might not bind to
the current def.

Ok, thanks. Guess I'll be testing the following:

@@ -6867,6 +6877,7 @@ default_binds_local_p_3 (const_tree exp,
   /* Static variables are always local.  */
   if (! TREE_PUBLIC (exp))
     return true;
+  gcc_assert (TREE_CODE (exp) != LABEL_DECL);

   /* With resolution file in hand, take look into resolutions.
      We can't just return true for resolved_locally symbols,
@@ -6978,6 +6989,7 @@ decl_binds_to_current_def_p (const_tree
     return false;
   if (!TREE_PUBLIC (decl))
     return true;
+  gcc_assert (TREE_CODE (exp) != LABEL_DECL);

   /* When resolution is available, just use it.  */
   if (symtab_node *node = symtab_node::get (decl))


Reply via email to