summaryrefslogtreecommitdiff
path: root/gcc/java/mangle.c
diff options
context:
space:
mode:
authortlaurenzo <tlaurenzo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-11 01:34:02 +0000
committertlaurenzo <tlaurenzo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-12-11 01:34:02 +0000
commit4c8420c9b081e5e11b17aad8495674196307bf76 (patch)
treed3a6af3b149154654e7557325e0a2d26a3b83556 /gcc/java/mangle.c
parent169164630a30180d2b6a962d7094474d0a601ff2 (diff)
downloadgcc-4c8420c9b081e5e11b17aad8495674196307bf76.tar.gz
Fixes java/PR9861
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108374 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/java/mangle.c')
-rw-r--r--gcc/java/mangle.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/java/mangle.c b/gcc/java/mangle.c
index e8df917e423..372c9466c63 100644
--- a/gcc/java/mangle.c
+++ b/gcc/java/mangle.c
@@ -188,6 +188,14 @@ mangle_method_decl (tree mdecl)
if (TREE_CODE (TREE_TYPE (mdecl)) == METHOD_TYPE)
arglist = TREE_CHAIN (arglist);
+ /* Output literal 'J' and mangle the return type IF not a
+ constructor. */
+ if (!ID_INIT_P (method_name))
+ {
+ obstack_1grow (mangle_obstack, 'J');
+ mangle_type(TREE_TYPE(TREE_TYPE(mdecl)));
+ }
+
/* No arguments is easy. We shortcut it. */
if (arglist == end_params_node)
obstack_1grow (mangle_obstack, 'v');