aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2008-07-28 20:32:32 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2008-07-28 20:32:32 +0000
commit4d2ad64c5bc72eb10fc6fa28950d38a36cff1d29 (patch)
tree27bc737b856ed5e38f37234fa34ae7886bec905b
parentf6e377f82ecead63e8691b1d8349aa2c7811e02f (diff)
downloadgcc-4d2ad64c5bc72eb10fc6fa28950d38a36cff1d29.zip
gcc-4d2ad64c5bc72eb10fc6fa28950d38a36cff1d29.tar.gz
gcc-4d2ad64c5bc72eb10fc6fa28950d38a36cff1d29.tar.bz2
re PR ada/36957 (ACATS ce3801b ICE emit_move_insn, at expr.c:3381 post tuple merge)
2008-07-28 Richard Guenther <rguenther@suse.de> PR tree-optimization/36957 * tree-flow.h (tree_ssa_useless_type_conversion): Remove. (useless_type_conversion_p): Remove. (types_compatible_p): Remove. * gimple.h (tree_ssa_useless_type_conversion): Declare. (useless_type_conversion_p): Declare. (types_compatible_p): Declare. (gimple_expr_type): Return the base type only if it is trivially convertible to the subtype. From-SVN: r138217
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/gimple.h9
-rw-r--r--gcc/tree-flow.h3
3 files changed, 20 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 77face9..aa4d3b2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2008-07-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/36957
+ * tree-flow.h (tree_ssa_useless_type_conversion): Remove.
+ (useless_type_conversion_p): Remove.
+ (types_compatible_p): Remove.
+ * gimple.h (tree_ssa_useless_type_conversion): Declare.
+ (useless_type_conversion_p): Declare.
+ (types_compatible_p): Declare.
+ (gimple_expr_type): Return the base type only if it is
+ trivially convertible to the subtype.
+
2008-07-28 Andreas Tobler <a.tobler@schweiz.org>
* configure.ac: Use the m4_do macro to concatenate the warnings into
diff --git a/gcc/gimple.h b/gcc/gimple.h
index 744461d..0c11f3e 100644
--- a/gcc/gimple.h
+++ b/gcc/gimple.h
@@ -1007,6 +1007,11 @@ extern bool validate_gimple_arglist (const_gimple, ...);
/* In tree-ssa-operands.c */
extern void gimple_add_to_addresses_taken (gimple, tree);
+/* In tree-ssa.c */
+extern bool tree_ssa_useless_type_conversion (tree);
+extern bool useless_type_conversion_p (tree, tree);
+extern bool types_compatible_p (tree, tree);
+
/* Return the code for GIMPLE statement G. */
static inline enum gimple_code
@@ -1394,7 +1399,9 @@ gimple_expr_type (const_gimple stmt)
convertible to one of its sub-types. So always return
the base type here. */
if (INTEGRAL_TYPE_P (type)
- && TREE_TYPE (type))
+ && TREE_TYPE (type)
+ /* But only if they are trivially convertible. */
+ && useless_type_conversion_p (type, TREE_TYPE (type)))
type = TREE_TYPE (type);
return type;
}
diff --git a/gcc/tree-flow.h b/gcc/tree-flow.h
index 96c4795..1e94037 100644
--- a/gcc/tree-flow.h
+++ b/gcc/tree-flow.h
@@ -867,9 +867,6 @@ extern void redirect_edge_var_map_destroy (void);
extern edge ssa_redirect_edge (edge, basic_block);
extern void flush_pending_stmts (edge);
-extern bool tree_ssa_useless_type_conversion (tree);
-extern bool useless_type_conversion_p (tree, tree);
-extern bool types_compatible_p (tree, tree);
extern void verify_ssa (bool);
extern void delete_tree_ssa (void);
extern void walk_use_def_chains (tree, walk_use_def_chains_fn, void *, bool);