X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fgcc%2F4.9.2%2F110-pr64896.patch;fp=cirros-testvm%2Fsrc-cirros%2Fbuildroot-2015.05%2Fpackage%2Fgcc%2F4.9.2%2F110-pr64896.patch;h=92b6cb8bad0140a759e1038d54379e8d948427f6;hb=b0a0f15dfaa205161a7fcb20cf1b8cd4948c2ef3;hp=0000000000000000000000000000000000000000;hpb=c6ac3cd55ee2da956195eee393b0882105dfad4e;p=packages%2Ftrusty%2Fcirros-testvm.git diff --git a/cirros-testvm/src-cirros/buildroot-2015.05/package/gcc/4.9.2/110-pr64896.patch b/cirros-testvm/src-cirros/buildroot-2015.05/package/gcc/4.9.2/110-pr64896.patch new file mode 100644 index 0000000..92b6cb8 --- /dev/null +++ b/cirros-testvm/src-cirros/buildroot-2015.05/package/gcc/4.9.2/110-pr64896.patch @@ -0,0 +1,59 @@ +From fc39d7d6f0ac90086814306a43de38ad65c13f13 Mon Sep 17 00:00:00 2001 +From: yroux +Date: Tue, 10 Mar 2015 19:20:30 +0000 +Subject: [PATCH] gcc/ 2015-03-10 Yvan Roux + + Backport from trunk r220489. + 2015-02-06 Jakub Jelinek + + PR ipa/64896 + * cgraphunit.c (cgraph_node::expand_thunk): If + restype is not is_gimple_reg_type nor the thunk_fndecl + returns aggregate_value_p, set restmp to a temporary variable + instead of resdecl. + +gcc/testsuite/ +2015-03-10 Yvan Roux + + Backport from trunk r220489. + 2015-02-06 Jakub Jelinek + + PR ipa/64896 + * g++.dg/ipa/pr64896.C: New test. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_9-branch@221333 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + gcc/ChangeLog | 11 +++++++++++ + gcc/cgraphunit.c | 11 ++++++++--- + gcc/testsuite/ChangeLog | 8 ++++++++ + gcc/testsuite/g++.dg/ipa/pr64896.C | 29 +++++++++++++++++++++++++++++ + 4 files changed, 56 insertions(+), 3 deletions(-) + create mode 100644 gcc/testsuite/g++.dg/ipa/pr64896.C + +diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c +index 8f57607..130fc0d 100644 +--- a/gcc/cgraphunit.c ++++ b/gcc/cgraphunit.c +@@ -1572,9 +1572,14 @@ expand_thunk (struct cgraph_node *node, bool output_asm_thunks) + restmp = gimple_fold_indirect_ref (resdecl); + else if (!is_gimple_reg_type (restype)) + { +- restmp = resdecl; +- add_local_decl (cfun, restmp); +- BLOCK_VARS (DECL_INITIAL (current_function_decl)) = restmp; ++ if (aggregate_value_p (resdecl, TREE_TYPE (thunk_fndecl))) ++ { ++ restmp = resdecl; ++ add_local_decl (cfun, restmp); ++ BLOCK_VARS (DECL_INITIAL (current_function_decl)) = restmp; ++ } ++ else ++ restmp = create_tmp_var (restype, "retval"); + } + else + restmp = create_tmp_reg (restype, "retval"); +-- +1.8.1.4 +