+2006-03-24 Jeff Law <law@redhat.com>
+
+ * tree-ssa-dom.c (propagate_rhs_into_lhs): Don't call update_stmt
+ directly. Call mark_new_vars_to_rename slightly earlier.
+
2006-03-24 Geoffrey Keating <geoffk@apple.com>
PR 26793
+2006-03-24 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/pr26840.c: New test.
+
2006-03-24 Geoffrey Keating <geoffk@apple.com>
* g++.old-deja/g++.other/init19.C: New.
--- /dev/null
+extern int f1 (void **);
+extern void f2 (void *);
+
+struct s
+{
+ unsigned char field1;
+ int field2;
+};
+
+static inline struct s *
+get_globals (void)
+{
+ struct s * r;
+ void * rr;
+
+ if (f1 (&rr))
+ return 0;
+ r = rr;
+ if (! r)
+ {
+ extern struct s t;
+ r = &t;
+ }
+ r->field1 = 1;
+ return r;
+}
+
+void
+atexit_common (const void *dso)
+{
+ struct s *g = get_globals ();
+
+ if (! g)
+ return;
+ if (g->field1)
+ {
+ g->field2 = 0;
+ f2 (g);
+ }
+ else
+ f2 (g);
+}
collapse control statements. */
propagate_value (use_p, rhs);
fold_stmt_inplace (use_stmt);
- update_stmt (use_stmt);
+
+ /* Sometimes propagation can expose new operands to the
+ renamer. Note this will call update_stmt at the
+ appropriate time. */
+ mark_new_vars_to_rename (use_stmt);
/* Dump details. */
if (dump_file && (dump_flags & TDF_DETAILS))
fprintf (dump_file, "\n");
}
- /* Sometimes propagation can expose new operands to the
- renamer. */
- mark_new_vars_to_rename (use_stmt);
-
/* If we replaced a variable index with a constant, then
we would need to update the invariant flag for ADDR_EXPRs. */
if (TREE_CODE (use_stmt) == MODIFY_EXPR