re PR c++/27826 (ICE in copy_to_mode_reg)

2007-01-05  Richard Guenther  <rguenther@suse.de>

        PR middle-end/27826
        * tree.c (get_narrower): Do not construct COMPONENT_REFs
        with mismatched types.  Instead explicitly build a
        conversion NOP_EXPR.

From-SVN: r120523
This commit is contained in:
Richard Guenther
2007-01-06 10:59:34 +00:00
committed by Richard Biener
parent 88ee8a6b0d
commit c9770f4e40
2 changed files with 9 additions and 4 deletions

View File

@@ -1,3 +1,10 @@
2007-01-05 Richard Guenther <rguenther@suse.de>
PR middle-end/27826
* tree.c (get_narrower): Do not construct COMPONENT_REFs
with mismatched types. Instead explicitly build a
conversion NOP_EXPR.
2007-01-05 Jakub Jelinek <jakub@redhat.com>
PR c/30360

View File

@@ -5635,12 +5635,10 @@ get_narrower (tree op, int *unsignedp_ptr)
{
if (first)
uns = DECL_UNSIGNED (TREE_OPERAND (op, 1));
win = build3 (COMPONENT_REF, type, TREE_OPERAND (op, 0),
TREE_OPERAND (op, 1), NULL_TREE);
TREE_SIDE_EFFECTS (win) = TREE_SIDE_EFFECTS (op);
TREE_THIS_VOLATILE (win) = TREE_THIS_VOLATILE (op);
win = fold_convert (type, op);
}
}
*unsignedp_ptr = uns;
return win;
}