From: Daniel Berlin Date: Mon, 19 Jun 2006 14:33:46 +0000 (+0000) Subject: re PR tree-optimization/27341 (ICE in in add_virtual_operand with complex types) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=46b86adcdc8bdf4f49df1b52de41eefd9a1afd60;p=gcc.git re PR tree-optimization/27341 (ICE in in add_virtual_operand with complex types) 2006-06-19 Daniel Berlin Fix PR tree-optimization/27341 * tree-cfg.c (gimplify_val): Call mark_new_vars_to_rename on the statement we get. * tree-complex.c (pass_lower_complex): Update SMT usage. From-SVN: r114771 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2c7c65a6d9f..34b7da6cbbe 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2006-06-19 Daniel Berlin + + Fix PR tree-optimization/27341 + * tree-cfg.c (gimplify_val): Call mark_new_vars_to_rename on the + statement we get. + * tree-complex.c (pass_lower_complex): Update SMT usage. + 2006-06-19 Andreas Krebbel * config/s390/s390.md ("doloop_si64", "doloop_si31", "doloop_di"): diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27341-1.c b/gcc/testsuite/gcc.c-torture/compile/pr27341-1.c new file mode 100644 index 00000000000..b77e937b9ce --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr27341-1.c @@ -0,0 +1,7 @@ +extern double R_NaReal; +void z_atan2 (double _Complex * r, double _Complex * ccs) +{ + if (*ccs == 0) + __imag__ *r = R_NaReal; +} + diff --git a/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c b/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c new file mode 100644 index 00000000000..e6be1e4712d --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr27341-2.c @@ -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 ; +} diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index a3fed03956f..6dbb7d367e1 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -5584,6 +5584,8 @@ gimplify_val (block_stmt_iterator *bsi, tree type, tree exp) 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; } diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c index 0a5040ebfcd..f841844f88e 100644 --- a/gcc/tree-complex.c +++ b/gcc/tree-complex.c @@ -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 */ };