https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64896
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Fri Feb 6 20:47:20 2015 New Revision: 220489 URL: https://gcc.gnu.org/viewcvs?rev=220489&root=gcc&view=rev Log: 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. * g++.dg/ipa/pr64896.C: New test. Added: trunk/gcc/testsuite/g++.dg/ipa/pr64896.C Modified: trunk/gcc/ChangeLog trunk/gcc/cgraphunit.c trunk/gcc/testsuite/ChangeLog