aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2016-03-16 15:51:47 +0000
committerMarek Polacek <mpolacek@gcc.gnu.org>2016-03-16 15:51:47 +0000
commitab4c578f0ce61491c694bea751323973fabf0f95 (patch)
treeae34ca036a37457ea8c7f084769e76de4294edff /gcc/cgraphunit.c
parentf5387e76b79440e3cb4d7392d7aea66037d375b8 (diff)
downloadgcc-ab4c578f0ce61491c694bea751323973fabf0f95.zip
gcc-ab4c578f0ce61491c694bea751323973fabf0f95.tar.gz
gcc-ab4c578f0ce61491c694bea751323973fabf0f95.tar.bz2
re PR c/70093 (Instancing function with VM return type cases internal compiler error in 'assign_stack_temp_for_type'.)
PR c/70093 * c-typeck.c (build_function_call_vec): Create a TARGET_EXPR for nested functions returning VM types. * cgraphunit.c (cgraph_node::expand_thunk): Also build call to the function being thunked if the result type doesn't have fixed size. * gimplify.c (gimplify_modify_expr): Also set LHS if the result type doesn't have fixed size. * gcc.dg/nested-func-10.c: New test. * gcc.dg/nested-func-9.c: New test. From-SVN: r234259
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 8b3fddc..4351ae4 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1708,7 +1708,9 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
/* Build call to the function being thunked. */
if (!VOID_TYPE_P (restype)
- && (!alias_is_noreturn || TREE_ADDRESSABLE (restype)))
+ && (!alias_is_noreturn
+ || TREE_ADDRESSABLE (restype)
+ || TREE_CODE (TYPE_SIZE_UNIT (restype)) != INTEGER_CST))
{
if (DECL_BY_REFERENCE (resdecl))
{