Patchwork [ARM] Fix PR target/49816

login
register
mail settings
Submitter Richard Earnshaw
Date July 23, 2011, 2:46 p.m.
Message ID <4E2ADED1.6030903@buzzard.freeserve.co.uk>
Download mbox | patch
Permalink /patch/106474/
State New
Headers show

Comments

Richard Earnshaw - July 23, 2011, 2:46 p.m.
In C it makes no difference if a function returning a pointer returns
false or NULL, but in when bootstrapping in C++ it's another story.

Fixed thusly:

2011-07-23  Richard Earnshaw  <rearnsha@arm.com>

	PR target/49816
	* arm.c (aapcs_vfp_allocate_return_reg): Return NULL on failure.

Patch

diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 6e2b799..a51c87a 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -3996,7 +3996,7 @@  aapcs_vfp_allocate_return_reg (enum arm_pcs pcs_variant ATTRIBUTE_UNUSED,
 			       const_tree type ATTRIBUTE_UNUSED)
 {
   if (!use_vfp_abi (pcs_variant, false))
-    return false;
+    return NULL;
 
   if (mode == BLKmode || (mode == TImode && !TARGET_NEON))
     {