PR tree-optimization/33340
* tree-ssa-sccvn.c (set_ssa_val_to): Do not set values to
SSA_NAMEs that occur in abnormal PHI nodes.
* g++.dg/torture/pr33340.C: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@128571
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-09-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/33340
+ * tree-ssa-sccvn.c (set_ssa_val_to): Do not set values to
+ SSA_NAMEs that occur in abnormal PHI nodes.
+
2007-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* tree-cfg.c (is_ctrl_altering_stmt, tree_block_ends_with_call_p):
+2007-09-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/33340
+ * g++.dg/torture/pr33340.C: New testcase.
+
2007-09-18 Tobias Burnus <burnus@net-b.de>
PR fortran/33231
--- /dev/null
+void* operator new(__SIZE_TYPE__, void* __p) { }
+
+struct auto_ptr {
+ int* p;
+ ~auto_ptr() { delete p; }
+};
+
+typedef void* T;
+struct vector {
+ void push_back(const T& __x) {
+ ::new(0) T(__x);
+ insert(__x);
+ }
+ void insert(const T& __x);
+} v;
+
+void g();
+void f() {
+ auto_ptr ap;
+ if (ap.p) {
+ ap.p = new int();
+ }
+ g();
+ int* tmp = ap.p;
+ ap.p = 0;
+ v.push_back(tmp);
+}
{
tree currval;
+ if (from != to
+ && TREE_CODE (to) == SSA_NAME
+ && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (to))
+ to = from;
+
/* The only thing we allow as value numbers are VN_TOP, ssa_names
and invariants. So assert that here. */
gcc_assert (to != NULL_TREE