diff options
author | Richard Guenther <rguenther@suse.de> | 2012-03-12 10:43:17 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2012-03-12 10:43:17 +0000 |
commit | 3f5f659208192192b83af727ab2f0103c16c1c44 (patch) | |
tree | c4db522d46c717e3c63a6d84f7549bb941bf12d1 /gcc/tree-cfg.c | |
parent | 01c1f20dc516ba119bb6162119533914165d6451 (diff) | |
download | gcc-3f5f659208192192b83af727ab2f0103c16c1c44.tar.gz |
tree-sra.c (create_access_replacement): Only rename the replacement if we can rewrite it into SSA form.
2012-03-12 Richard Guenther <rguenther@suse.de>
* tree-sra.c (create_access_replacement): Only rename the
replacement if we can rewrite it into SSA form. Properly
mark register typed replacements that we cannot rewrite
with TREE_ADDRESSABLE.
* tree-cfg.c (verify_expr): Fix BIT_FIELD_REF verification
for aggregate or BLKmode results.
From-SVN: r185221
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index 9f75650d7a7..eb7b62a72c5 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -2790,17 +2790,19 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED) error ("invalid position or size operand to BIT_FIELD_REF"); return t; } - else if (INTEGRAL_TYPE_P (TREE_TYPE (t)) - && (TYPE_PRECISION (TREE_TYPE (t)) - != TREE_INT_CST_LOW (TREE_OPERAND (t, 1)))) + if (INTEGRAL_TYPE_P (TREE_TYPE (t)) + && (TYPE_PRECISION (TREE_TYPE (t)) + != TREE_INT_CST_LOW (TREE_OPERAND (t, 1)))) { error ("integral result type precision does not match " "field size of BIT_FIELD_REF"); return t; } - if (!INTEGRAL_TYPE_P (TREE_TYPE (t)) - && (GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (t))) - != TREE_INT_CST_LOW (TREE_OPERAND (t, 1)))) + else if (!INTEGRAL_TYPE_P (TREE_TYPE (t)) + && !AGGREGATE_TYPE_P (TREE_TYPE (t)) + && TYPE_MODE (TREE_TYPE (t)) != BLKmode + && (GET_MODE_PRECISION (TYPE_MODE (TREE_TYPE (t))) + != TREE_INT_CST_LOW (TREE_OPERAND (t, 1)))) { error ("mode precision of non-integral result does not " "match field size of BIT_FIELD_REF"); |