diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2016-02-17 09:08:09 +0000 |
---|---|---|
committer | Eric Botcazou <ebotcazou@gcc.gnu.org> | 2016-02-17 09:08:09 +0000 |
commit | bf17fe3f736580a65427cc9e0e814e3ffe6e7fe5 (patch) | |
tree | df70e4758110251ef340a136d8439f15b3847d6c /gcc/ada/gcc-interface/utils2.c | |
parent | 244901a5721d5bf5597ac71117e50b190337da44 (diff) | |
download | gcc-bf17fe3f736580a65427cc9e0e814e3ffe6e7fe5.zip gcc-bf17fe3f736580a65427cc9e0e814e3ffe6e7fe5.tar.gz gcc-bf17fe3f736580a65427cc9e0e814e3ffe6e7fe5.tar.bz2 |
utils2.c (gnat_protect_expr): Make a SAVE_EXPR only for fat pointer or scalar types.
* gcc-interface/utils2.c (gnat_protect_expr): Make a SAVE_EXPR only
for fat pointer or scalar types.
From-SVN: r233484
Diffstat (limited to 'gcc/ada/gcc-interface/utils2.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils2.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/gcc/ada/gcc-interface/utils2.c b/gcc/ada/gcc-interface/utils2.c index ba4a5dca..44a05fb 100644 --- a/gcc/ada/gcc-interface/utils2.c +++ b/gcc/ada/gcc-interface/utils2.c @@ -2559,12 +2559,11 @@ gnat_protect_expr (tree exp) return build3 (code, type, gnat_protect_expr (TREE_OPERAND (exp, 0)), TREE_OPERAND (exp, 1), TREE_OPERAND (exp, 2)); - /* If this is a fat pointer or something that can be placed in a register, - just make a SAVE_EXPR. Likewise for a CALL_EXPR as large objects are - returned via invisible reference in most ABIs so the temporary will - directly be filled by the callee. */ + /* If this is a fat pointer or a scalar, just make a SAVE_EXPR. Likewise + for a CALL_EXPR as large objects are returned via invisible reference + in most ABIs so the temporary will directly be filled by the callee. */ if (TYPE_IS_FAT_POINTER_P (type) - || TYPE_MODE (type) != BLKmode + || !AGGREGATE_TYPE_P (type) || code == CALL_EXPR) return save_expr (exp); |