* cgraphunit.c (assemble_thunk): Use correct return type.
authorMichael Matz <matz@suse.de>
Wed, 22 Jun 2011 13:59:03 +0000 (13:59 +0000)
committerMichael Matz <matz@gcc.gnu.org>
Wed, 22 Jun 2011 13:59:03 +0000 (13:59 +0000)
From-SVN: r175294

gcc/ChangeLog
gcc/cgraphunit.c

index 9a075199c5e558f6f715d2598d057d9c4e6f922f..125a9b27c1f2b3fa8becb0319a94dec7890672d5 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 de9bbe3edeb611a07d44e689fb1e15d4436f9058..eefd37226f9b85d452f1491910d69430f24fa669 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