diff options
author | Richard Guenther <rguenther@suse.de> | 2009-04-27 11:18:38 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2009-04-27 11:18:38 +0000 |
commit | 211ca15cb41d3ae362b6e0b01e47344a9b30d987 (patch) | |
tree | 311268027d8b08e109c2a84ccb88ed8b40680011 /gcc/tree-inline.c | |
parent | fca5f3d11ce7bc4c2c1b302217d0a4247f2596fd (diff) | |
download | gcc-211ca15cb41d3ae362b6e0b01e47344a9b30d987.zip gcc-211ca15cb41d3ae362b6e0b01e47344a9b30d987.tar.gz gcc-211ca15cb41d3ae362b6e0b01e47344a9b30d987.tar.bz2 |
re PR java/38374 (constant pool references have wrong types in ADDR_EXPR)
2009-04-27 Richard Guenther <rguenther@suse.de>
* tree-cfg.c (remove_useless_stmts): Verify stmts afterwards.
(verify_stmts): Dispatch to gimple/type verification code.
* tree-inline.c (remap_gimple_op_r): Work around C++ FE
issue with call argument types.
java/
PR java/38374
* constants.c (build_constants_constructor): Retain the old
pointer type as valid TYPE_POINTER_TO after patching the
type of the constant pool decl.
From-SVN: r146831
Diffstat (limited to 'gcc/tree-inline.c')
-rw-r--r-- | gcc/tree-inline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 9344880..b134ae5 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -705,6 +705,13 @@ remap_gimple_op_r (tree *tp, int *walk_subtrees, void *data) gcc_assert (new_decl); /* Replace this variable with the copy. */ STRIP_TYPE_NOPS (new_decl); + /* ??? The C++ frontend uses void * pointer zero to initialize + any other type. This confuses the middle-end type verification. + As cloned bodies do not go through gimplification again the fixup + there doesn't trigger. */ + if (TREE_CODE (new_decl) == INTEGER_CST + && !useless_type_conversion_p (TREE_TYPE (*tp), TREE_TYPE (new_decl))) + new_decl = fold_convert (TREE_TYPE (*tp), new_decl); *tp = new_decl; *walk_subtrees = 0; } |