diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-16 16:01:57 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-04-16 16:01:57 +0000 |
commit | e264d515e54443e1a50584f7c0dc0af7bc23a0a1 (patch) | |
tree | eb8633e764cac5e80e5b5885d5b624e8fbfb7c0e /gcc/tree-nrv.c | |
parent | 520c4c09f5989a934d8ccb44475f3fc60cf31e9c (diff) | |
download | gcc-e264d515e54443e1a50584f7c0dc0af7bc23a0a1.tar.gz |
PR c/35739
* tree-nrv.c (tree_nrv): Don't optimize if result_type is GIMPLE
reg type.
* gcc.dg/dfp/pr35739.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134351 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-nrv.c')
-rw-r--r-- | gcc/tree-nrv.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/tree-nrv.c b/gcc/tree-nrv.c index 7330d2896b5..35928ea99e7 100644 --- a/gcc/tree-nrv.c +++ b/gcc/tree-nrv.c @@ -1,5 +1,5 @@ /* Language independent return value optimizations - Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -115,6 +115,11 @@ tree_nrv (void) if (!aggregate_value_p (result, current_function_decl)) return 0; + /* If a GIMPLE type is returned in memory, finalize_nrv_r might create + non-GIMPLE. */ + if (is_gimple_reg_type (result_type)) + return 0; + /* Look through each block for assignments to the RESULT_DECL. */ FOR_EACH_BB (bb) { |