This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ARM] Minor fix in arm_function_ok_for_sibcall


Several tests in the function were updated with a guard for a NULL decl but 
not the VxWorks-specific one, which results in a segfault building libgcc.

Tested on ARM/VxWorks, applied on mainline, 6 and 5 branches as obvious.


2016-07-01  Eric Botcazou  <ebotcazou@adacore.com>

	* config/arm/arm.c (arm_function_ok_for_sibcall): Add another check
	for NULL decl.

-- 
Eric Botcazou
Index: config/arm/arm.c
===================================================================
--- config/arm/arm.c	(revision 237902)
+++ config/arm/arm.c	(working copy)
@@ -6756,7 +6756,7 @@ arm_function_ok_for_sibcall (tree decl,
 
   /* The PIC register is live on entry to VxWorks PLT entries, so we
      must make the call before restoring the PIC register.  */
-  if (TARGET_VXWORKS_RTP && flag_pic && !targetm.binds_local_p (decl))
+  if (TARGET_VXWORKS_RTP && flag_pic && decl && !targetm.binds_local_p (decl))
     return false;
 
   /* If we are interworking and the function is not declared static

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]