diff options
author | Richard Guenther <rguenther@suse.de> | 2009-05-02 17:49:32 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-05-02 17:49:32 +0000 |
commit | 4636b850f65b40e23bb6f6c7db00adfdab2602da (patch) | |
tree | 63b674cab8c718bf17708549a9c54440fbe71c18 /gcc/gimplify.c | |
parent | 25195e82643714f6f73737cd51c217692acbe836 (diff) | |
download | gcc-4636b850f65b40e23bb6f6c7db00adfdab2602da.zip gcc-4636b850f65b40e23bb6f6c7db00adfdab2602da.tar.gz gcc-4636b850f65b40e23bb6f6c7db00adfdab2602da.tar.bz2 |
re PR regression/40001 (r146817 broke libgloss build for SPU)
2009-05-02 Richard Guenther <rguenther@suse.de>
PR middle-end/40001
* tree-ssa.c (execute_update_addresses_taken): Properly check
if we can mark a variable DECL_GIMPLE_REG_P.
* gimple.c (is_gimple_reg): Re-order check for DECL_GIMPLE_REG_P
back to the end of the function.
(is_gimple_reg_type): Remove complex type special casing.
* gimplify.c (gimplify_bind_expr): Do not set DECL_GIMPLE_REG_P
if not optimizing.
* gcc.target/spu/pr40001.c: New testcase.
From-SVN: r147064
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r-- | gcc/gimplify.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c index d886784..24481d1 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -1218,9 +1218,14 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p) /* Preliminarily mark non-addressed complex variables as eligible for promotion to gimple registers. We'll transform their uses - as we find them. */ - if ((TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE - || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) + as we find them. + We exclude complex types if not optimizing because they can be + subject to partial stores in GNU C by means of the __real__ and + __imag__ operators and we cannot promote them to total stores + (see gimplify_modify_expr_complex_part). */ + if (optimize + && (TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE + || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) && !TREE_THIS_VOLATILE (t) && (TREE_CODE (t) == VAR_DECL && !DECL_HARD_REGISTER (t)) && !needs_to_live_in_memory (t)) |