This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/27341] [4.2 Regression] ICE in in add_virtual_operand with complex types
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jun 2006 15:18:34 -0000
- Subject: [Bug tree-optimization/27341] [4.2 Regression] ICE in in add_virtual_operand with complex types
- References: <bug-27341-6528@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #12 from dberlin at gcc dot gnu dot org 2006-06-15 15:18 -------
Subject: Bug 27341
Patch I am testing for all the testcases here.
It turns out to be a problem not actually in the 02-20-06 patch.
Index: gcc/tree-complex.c
===================================================================
--- gcc/tree-complex.c (revision 114136)
+++ gcc/tree-complex.c (working copy)
@@ -1541,11 +1541,12 @@ struct tree_opt_pass pass_lower_complex
0, /* tv_id */
PROP_ssa, /* properties_required */
0, /* properties_provided */
- 0, /* properties_destroyed */
+ PROP_smt_usage, /* properties_destroyed */
0, /* todo_flags_start */
TODO_dump_func | TODO_ggc_collect
- | TODO_update_ssa
- | TODO_verify_stmts, /* todo_flags_finish */
+ | TODO_update_smt_usage
+ | TODO_update_ssa
+ | TODO_verify_stmts, /* todo_flags_finish */
0 /* letter */
};
Index: gcc/testsuite/gcc.c-torture/compile/pr27341-1.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr27341-1.c (revision 0)
+++ gcc/testsuite/gcc.c-torture/compile/pr27341-1.c (revision 0)
@@ -0,0 +1,7 @@
+extern double R_NaReal;
+void z_atan2 (double _Complex * r, double _Complex * ccs)
+{
+ if (*ccs == 0)
+ __imag__ *r = R_NaReal;
+}
+
Index: gcc/testsuite/gcc.c-torture/compile/pr27341-2.c
===================================================================
--- gcc/testsuite/gcc.c-torture/compile/pr27341-2.c (revision 0)
+++ gcc/testsuite/gcc.c-torture/compile/pr27341-2.c (revision 0)
@@ -0,0 +1,8 @@
+void zgemm_ (const int*, const double*);
+extern void matmul_c8 (_Complex double * dest)
+{
+ const int ldc = 0;
+ const double zero = 0;
+ zgemm_ ( &zero, &ldc);
+ dest[1] += 1 ;
+}
Index: gcc/tree-cfg.c
===================================================================
--- gcc/tree-cfg.c (revision 114136)
+++ gcc/tree-cfg.c (working copy)
@@ -5584,6 +5584,8 @@ gimplify_val (block_stmt_iterator *bsi,
TREE_BLOCK (new_stmt) = TREE_BLOCK (orig_stmt);
bsi_insert_before (bsi, new_stmt, BSI_SAME_STMT);
+ if (in_ssa_p)
+ mark_new_vars_to_rename (new_stmt);
return t;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27341