+2005-07-12 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/21840
+ * tree-ssa-pre.c (eliminate): Convert the sprime to the correct type
+ if *rhs_p is not a SSA_NAME.
+
2005-07-12 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/22422
+2005-07-12 Andrew Pinski <pinskia@physics.uc.edu>
+
+ PR tree-opt/21840
+ * gcc.c-torture/compile/pr21840.c: New test.
+
2005-07-12 Jan Hubicka <jh@suse.cz>
* gcc.c-torture/compile/pr22379.c: New test.
--- /dev/null
+void fn_show_state(void);
+typedef void (*fn_handler_fn)(void);
+static fn_handler_fn fn_handler[1];
+
+void k_spec(unsigned char value)
+{
+ void *func = fn_handler[value];
+ if (func == fn_show_state )
+ return;
+ fn_handler[value]();
+}
fprintf (dump_file, " in ");
print_generic_stmt (dump_file, stmt, 0);
}
+
if (TREE_CODE (sprime) == SSA_NAME)
NECESSARY (SSA_NAME_DEF_STMT (sprime)) = 1;
+ /* We need to make sure the new and old types actually match,
+ which may require adding a simple cast, which fold_convert
+ will do for us. */
+ if (TREE_CODE (*rhs_p) != SSA_NAME
+ && !tree_ssa_useless_type_conversion_1 (TREE_TYPE (*rhs_p),
+ TREE_TYPE (sprime)))
+ sprime = fold_convert (TREE_TYPE (*rhs_p), sprime);
+
pre_stats.eliminations++;
propagate_tree_value (rhs_p, sprime);
update_stmt (stmt);