]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
decl.c (intrin_return_compatible_p): Map Address to void *.
authorTristan Gingold <gingold@adacore.com>
Mon, 16 Jul 2012 13:10:02 +0000 (13:10 +0000)
committerArnaud Charlet <charlet@gcc.gnu.org>
Mon, 16 Jul 2012 13:10:02 +0000 (15:10 +0200)
2012-07-16  Tristan Gingold  <gingold@adacore.com>

* decl.c (intrin_return_compatible_p): Map Address to void *.

From-SVN: r189536

gcc/ada/ChangeLog
gcc/ada/gcc-interface/decl.c

index 15797a1b65a5fb0a1c491312c283f40c250617f2..a8e82037ba7b0f31e47425852fd87d30d3ec131d 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-16  Tristan Gingold  <gingold@adacore.com>
+
+       * gcc-interface/decl.c (intrin_return_compatible_p): Map Address to
+       void *.
+
 2012-07-16  Thomas Quinot  <quinot@adacore.com>
 
        * exp_ch9.adb (Ensure_Statement_Present): New subprogram.
index 9a2dc458b2f6023c27c92099aedf9ee1ffba586f..ef7c87c366e8d3a027a2f71cbe9633aef87f587b 100644 (file)
@@ -8046,6 +8046,10 @@ intrin_return_compatible_p (intrin_binding_t * inb)
       && !VOID_TYPE_P (btin_return_type))
     return true;
 
+  /* If return type is Address (integer type), map it to void *.  */
+  if (Is_Descendent_Of_Address (Etype (inb->gnat_entity)))
+    ada_return_type = ptr_void_type_node;
+
   /* Check return types compatibility otherwise.  Note that this
      handles void/void as well.  */
   if (intrin_types_incompatible_p (btin_return_type, ada_return_type))