From 4399cf590fbac5aa65ff0e44e8e5dade5741773f Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Wed, 22 Jun 2011 13:59:03 +0000 Subject: [PATCH] * cgraphunit.c (assemble_thunk): Use correct return type. From-SVN: r175294 --- gcc/ChangeLog | 4 ++++ gcc/cgraphunit.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9a075199c5e..125a9b27c1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2011-06-22 Michael Matz + + * cgraphunit.c (assemble_thunk): Use correct return type. + 2011-06-22 Dmitry Plotnikov Dmitry Melnik diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c index de9bbe3edeb..eefd37226f9 100644 --- a/gcc/cgraphunit.c +++ b/gcc/cgraphunit.c @@ -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 -- 2.30.2