diff options
author | Jason Merrill <jason@redhat.com> | 2010-02-16 10:08:23 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2010-02-16 10:08:23 -0500 |
commit | 0d08582ee624ed10c494f72e561f2036ecd227d0 (patch) | |
tree | 3f18ccee037dc8af1705b63349871626f3a06335 /gcc | |
parent | 99f51320d47ba6565b21dbf9a1ec999b193fde0a (diff) | |
download | gcc-0d08582ee624ed10c494f72e561f2036ecd227d0.zip gcc-0d08582ee624ed10c494f72e561f2036ecd227d0.tar.gz gcc-0d08582ee624ed10c494f72e561f2036ecd227d0.tar.bz2 |
* cp-gimplify.c (cp_gimplify_expr): Fix error recovery.
From-SVN: r156803
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 2 | ||||
-rw-r--r-- | gcc/cp/cp-gimplify.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5b433f0..4a7b125 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,7 @@ 2010-02-16 Jason Merrill <jason@redhat.com> + * cp-gimplify.c (cp_gimplify_expr): Fix error recovery. + PR c++/43031 * cp-gimplify.c (cp_gimplify_expr) [MODIFY_EXPR]: Use VIEW_CONVERT_EXPR for conversions between structural equality types diff --git a/gcc/cp/cp-gimplify.c b/gcc/cp/cp-gimplify.c index 7dc79b2..cf81350 100644 --- a/gcc/cp/cp-gimplify.c +++ b/gcc/cp/cp-gimplify.c @@ -560,8 +560,10 @@ cp_gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p) tree op0 = TREE_OPERAND (*expr_p, 0); tree op1 = TREE_OPERAND (*expr_p, 1); - if ((TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op0)) - || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op1))) + if (!error_operand_p (op0) + && !error_operand_p (op1) + && (TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op0)) + || TYPE_STRUCTURAL_EQUALITY_P (TREE_TYPE (op1))) && !useless_type_conversion_p (TREE_TYPE (op1), TREE_TYPE (op0))) TREE_OPERAND (*expr_p, 1) = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (op0), op1); |