On 10/30/19 11:23 PM, Jeff Law wrote:
> On 10/30/19 4:06 PM, Joseph Myers wrote:
>> On Wed, 30 Oct 2019, Joseph Myers wrote:
>>
>>> This appears to have broken the build for Arm.
>>
>> And probably bfin and c6x as well, based on grep, but my bot only covers 
>> glibc targets so doesn't test those.
>>
> bfin and c6x are definitely affected.  My tester flagged them.
> 
> jeff
> 

Sorry for the breakage, I'm going to install the following patch.
The patch was tested for all the affected cross compilers.

Thanks,
Martin
From 5f989a34baed24afe4f63109c4260c1663dd4044 Mon Sep 17 00:00:00 2001
From: Martin Liska <mli...@suse.cz>
Date: Thu, 31 Oct 2019 09:44:19 +0100
Subject: [PATCH] Remove missing usage of cgraph_local_info in arm,bfin and
 c6x.

gcc/ChangeLog:

2019-10-31  Martin Liska  <mli...@suse.cz>

	* config/arm/arm.c (arm_get_pcs_model): Remove usage
	of cgraph_local_info and use local_info_node instead.
	* config/bfin/bfin.c (bfin_load_pic_reg): Likewise.
	(bfin_function_ok_for_sibcall): Likewise.
	* config/c6x/c6x.c (c6x_function_ok_for_sibcall): Likewise.
	(must_reload_pic_reg_p): Likewise.
---
 gcc/config/arm/arm.c   |  5 +++--
 gcc/config/bfin/bfin.c | 18 +++++++++---------
 gcc/config/c6x/c6x.c   | 13 ++++++-------
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 5c2c48f4253..3c83b7f7f69 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -5956,8 +5956,9 @@ arm_get_pcs_model (const_tree type, const_tree decl)
 	     so we are free to use whatever conventions are
 	     appropriate.  */
 	  /* FIXME: remove CONST_CAST_TREE when cgraph is constified.  */
-	  cgraph_local_info *i = cgraph_node::local_info (CONST_CAST_TREE(decl));
-	  if (i && i->local)
+	  cgraph_node *local_info_node
+	    = cgraph_node::local_info_node (CONST_CAST_TREE (decl));
+	  if (local_info_node && local_info_node->local)
 	    return ARM_PCS_AAPCS_LOCAL;
 	}
     }
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index fbe4c10a8c8..b646d03f146 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -1036,14 +1036,14 @@ expand_interrupt_handler_epilogue (rtx spreg, e_funkind fkind, bool all)
 static rtx
 bfin_load_pic_reg (rtx dest)
 {
-  struct cgraph_local_info *i = NULL;
   rtx addr;
- 
-  i = cgraph_node::local_info (current_function_decl);
- 
+
+  cgraph_node *local_info_node
+    = cgraph_node::local_info_node (current_function_decl);
+
   /* Functions local to the translation unit don't need to reload the
      pic reg, since the caller always passes a usable one.  */
-  if (i && i->local)
+  if (local_info_node && local_info_node->local)
     return pic_offset_table_rtx;
       
   if (global_options_set.x_bfin_library_id)
@@ -1806,7 +1806,7 @@ static bool
 bfin_function_ok_for_sibcall (tree decl ATTRIBUTE_UNUSED,
 			      tree exp ATTRIBUTE_UNUSED)
 {
-  struct cgraph_local_info *this_func, *called_func;
+  cgraph_node *this_func, *called_func;
   e_funkind fkind = funkind (TREE_TYPE (current_function_decl));
   if (fkind != SUBROUTINE)
     return false;
@@ -1821,9 +1821,9 @@ bfin_function_ok_for_sibcall (tree decl ATTRIBUTE_UNUSED,
   if (!decl)
     /* Not enough information.  */
     return false;
- 
-  this_func = cgraph_node::local_info (current_function_decl);
-  called_func = cgraph_node::local_info (decl);
+
+  this_func = cgraph_node::local_info_node (current_function_decl);
+  called_func = cgraph_node::local_info_node (decl);
   if (!called_func)
     return false;
   return !called_func->local || this_func->local;
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index f8e8295245b..a6ff25fb754 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -1158,13 +1158,13 @@ c6x_function_ok_for_sibcall (tree decl, tree exp)
       /* When compiling for DSBT, the calling function must be local,
 	 so that when we reload B14 in the sibcall epilogue, it will
 	 not change its value.  */
-      struct cgraph_local_info *this_func;
 
       if (!decl)
 	/* Not enough information.  */
 	return false;
 
-      this_func = cgraph_node::local_info (current_function_decl);
+      cgraph_node *this_func
+	= cgraph_node::local_info_node (current_function_decl);
       return this_func->local;
     }
 
@@ -2516,14 +2516,13 @@ struct c6x_frame
 static bool
 must_reload_pic_reg_p (void)
 {
-  struct cgraph_local_info *i = NULL;
-
   if (!TARGET_DSBT)
     return false;
 
-  i = cgraph_node::local_info (current_function_decl);
-
-  if ((crtl->uses_pic_offset_table || !crtl->is_leaf) && !i->local)
+  cgraph_node *local_info_node
+    = cgraph_node::local_info_node (current_function_decl);
+  if ((crtl->uses_pic_offset_table || !crtl->is_leaf)
+      && !local_info_node->local)
     return true;
   return false;
 }
-- 
2.23.0

Attachment: pEpkey.asc
Description: application/pgp-keys

Reply via email to