diff options
author | Marek Polacek <polacek@redhat.com> | 2016-03-16 15:51:47 +0000 |
---|---|---|
committer | Marek Polacek <mpolacek@gcc.gnu.org> | 2016-03-16 15:51:47 +0000 |
commit | ab4c578f0ce61491c694bea751323973fabf0f95 (patch) | |
tree | ae34ca036a37457ea8c7f084769e76de4294edff /gcc/gimplify.c | |
parent | f5387e76b79440e3cb4d7392d7aea66037d375b8 (diff) | |
download | gcc-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/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index b331e41..692d168 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4838,7 +4838,8 @@ gimplify_modify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, } notice_special_calls (call_stmt); if (!gimple_call_noreturn_p (call_stmt) - || TREE_ADDRESSABLE (TREE_TYPE (*to_p))) + || TREE_ADDRESSABLE (TREE_TYPE (*to_p)) + || TREE_CODE (TYPE_SIZE_UNIT (TREE_TYPE (*to_p))) != INTEGER_CST) gimple_call_set_lhs (call_stmt, *to_p); assign = call_stmt; } |