aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-03-05 10:32:07 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-03-05 10:32:07 +0000
commite55f42fb7738d37959ec19d10e8335f9c8269eea (patch)
treedbc226445478bac071c83a30072ba45eb3da7ff8 /gcc/tree-cfg.c
parent1da266feea1a26357fa5522803e8c08f3ac6a5d8 (diff)
downloadgcc-e55f42fb7738d37959ec19d10e8335f9c8269eea.zip
gcc-e55f42fb7738d37959ec19d10e8335f9c8269eea.tar.gz
gcc-e55f42fb7738d37959ec19d10e8335f9c8269eea.tar.bz2
re PR c++/35336 (Broken diagnostic: 'bit_field_ref' not supported by dump_expr)
2008-03-05 Richard Guenther <rguenther@suse.de> PR c++/35336 * tree.def (BIT_FIELD_REF): Document that operands 1 and 2 should be constants. * tree-cfg.c (verify_expr): Verify it. * fold-const.c (fold_truthop): Remove code generating BIT_FIELD_REFs of structure bases. (fold_binary): Likewise. (fold_ternary): Position and size of BIT_FIELD_REFs are always host integers. (make_bit_field_ref): Remove. (optimize_bit_field_compare): Remove. (all_ones_mask_p): Remove. From-SVN: r132894
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index 844e7c1..abc1672 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3267,8 +3267,12 @@ verify_expr (tree *tp, int *walk_subtrees, void *data ATTRIBUTE_UNUSED)
}
else if (TREE_CODE (t) == BIT_FIELD_REF)
{
- CHECK_OP (1, "invalid operand to BIT_FIELD_REF");
- CHECK_OP (2, "invalid operand to BIT_FIELD_REF");
+ if (!host_integerp (TREE_OPERAND (t, 1), 1)
+ || !host_integerp (TREE_OPERAND (t, 2), 1))
+ {
+ error ("invalid position or size operand to BIT_FIELD_REF");
+ return t;
+ }
}
t = TREE_OPERAND (t, 0);