diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-16 13:10:02 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-07-16 13:10:02 +0000 |
commit | 4be5aafb4d9a2f6371994bad1c88beffb867b94a (patch) | |
tree | 6ee0e07e764406617f8f8b5651122752fcf8ea7f /gcc/ada/gcc-interface | |
parent | e3cb82020e2994a4a2847656af5390c342cc7226 (diff) | |
download | gcc-4be5aafb4d9a2f6371994bad1c88beffb867b94a.tar.gz |
2012-07-16 Tristan Gingold <gingold@adacore.com>
* decl.c (intrin_return_compatible_p): Map Address to void *.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189536 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/gcc-interface')
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 9a2dc458b2f..ef7c87c366e 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -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)) |