OSDN Git Service

* cgraphunit.c (assemble_thunk): Use correct return type.
authormatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Jun 2011 13:59:03 +0000 (13:59 +0000)
committermatz <matz@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Jun 2011 13:59:03 +0000 (13:59 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175294 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/cgraphunit.c

index 9a07519..125a9b2 100644 (file)
@@ -1,3 +1,7 @@
+2011-06-22  Michael Matz  <matz@suse.de>
+
+       * cgraphunit.c (assemble_thunk): Use correct return type.
+
 2011-06-22  Dmitry Plotnikov  <dplotnikov@ispras.ru>
        Dmitry Melnik  <dm@ispras.ru>
 
index de9bbe3..eefd372 100644 (file)
@@ -1581,10 +1581,11 @@ assemble_thunk (struct cgraph_node *node)
     {
       const char *fnname;
       tree fn_block;
+      tree restype = TREE_TYPE (TREE_TYPE (thunk_fndecl));
       
       DECL_RESULT (thunk_fndecl)
        = build_decl (DECL_SOURCE_LOCATION (thunk_fndecl),
-                     RESULT_DECL, 0, integer_type_node);
+                     RESULT_DECL, 0, restype);
       fnname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (thunk_fndecl));
 
       /* The back end expects DECL_INITIAL to contain a BLOCK, so we