From: rguenth Date: Fri, 20 Jan 2006 09:38:56 +0000 (+0000) Subject: 2006-01-20 Richard Guenther X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=commitdiff_plain;h=8345ac1a0c768dd932f2f48e15352859b1264e93 2006-01-20 Richard Guenther Steven Bosscher PR rtl-optimization/24626 * cfgloopmanip.c (lv_adjust_loop_entry_edge): Don't set EDGE_TRUE_VALUE if in RTL mode. Revert 2005-03-30 Mostafa Hagog * cfgrtl.c (rtl_verify_flow_info_1): Fix. * gcc.dg/torture/pr24626-1.c: New testcase. * gcc.dg/torture/pr24626-2.c: Likewise. * gcc.dg/torture/pr24626-3.c: Likewise. * gcc.dg/torture/pr24626-4.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@110020 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a23c2214f6..cf2a597d4a1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2006-01-20 Richard Guenther + Steven Bosscher + + PR rtl-optimization/24626 + * cfgloopmanip.c (lv_adjust_loop_entry_edge): Don't set + EDGE_TRUE_VALUE if in RTL mode. + + Revert + 2005-03-30 Mostafa Hagog + * cfgrtl.c (rtl_verify_flow_info_1): Fix. + 2006-01-20 Dirk Mueller PR c++/5520 diff --git a/gcc/cfgloopmanip.c b/gcc/cfgloopmanip.c index cfc11e0f62e..7d182314dd3 100644 --- a/gcc/cfgloopmanip.c +++ b/gcc/cfgloopmanip.c @@ -1419,7 +1419,7 @@ lv_adjust_loop_entry_edge (basic_block first_head, lv_add_condition_to_bb (first_head, second_head, new_head, cond_expr); - e1 = make_edge (new_head, first_head, EDGE_TRUE_VALUE); + e1 = make_edge (new_head, first_head, ir_type () ? EDGE_TRUE_VALUE : 0); set_immediate_dominator (CDI_DOMINATORS, first_head, new_head); set_immediate_dominator (CDI_DOMINATORS, second_head, new_head); diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index 765247260f2..11393b074d4 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2048,9 +2048,10 @@ rtl_verify_flow_info_1 (void) err = 1; } if (n_branch != 1 && any_condjump_p (BB_END (bb)) - && JUMP_LABEL (BB_END (bb)) == BB_HEAD (fallthru->dest)) + && JUMP_LABEL (BB_END (bb)) != BB_HEAD (fallthru->dest)) { - error ("wrong amount of branch edges after conditional jump %i", bb->index); + error ("wrong amount of branch edges after conditional jump %i", + bb->index); err = 1; } if (n_call && !CALL_P (BB_END (bb))) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c0cc34200a2..78e2311a9a2 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2006-01-20 Richard Guenther + Steven Bosscher + + PR rtl-optimization/24626 + * gcc.dg/torture/pr24626-1.c: New testcase. + * gcc.dg/torture/pr24626-2.c: Likewise. + * gcc.dg/torture/pr24626-3.c: Likewise. + * gcc.dg/torture/pr24626-4.c: Likewise. + 2006-01-20 Dirk Mueller PR c++/5520 diff --git a/gcc/testsuite/gcc.dg/torture/pr24626-1.c b/gcc/testsuite/gcc.dg/torture/pr24626-1.c new file mode 100644 index 00000000000..331c55ec3b0 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr24626-1.c @@ -0,0 +1,27 @@ +/* { dg-do compile } */ + +typedef long +(*bla)(int *node); + +static long F2(void *tree, long blk, bla after_node_func) +{ + long call_result = 0; + int *node; + + + if (call_result = after_node_func(node)) + goto error_free_node; + + T(node); + return 0; + +error_free_node: + T(node); +error: + return call_result; +} + +long F1(void *tree) +{ + return F2(tree, F3(tree), (void *)0); +} diff --git a/gcc/testsuite/gcc.dg/torture/pr24626-2.c b/gcc/testsuite/gcc.dg/torture/pr24626-2.c new file mode 100644 index 00000000000..e48d3b31c4b --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr24626-2.c @@ -0,0 +1,54 @@ +/* { dg-do compile } */ + +typedef unsigned int u_int8_t __attribute__ ((__mode__ (__QI__))); +typedef unsigned int u_int32_t __attribute__ ((__mode__ (__SI__))); +typedef u_int32_t db_pgno_t; +typedef struct __db DB; +typedef struct __db_env DB_ENV; +typedef struct __db_mpoolfile DB_MPOOLFILE; +typedef struct __dbc DBC; +struct __db { + DB_MPOOLFILE *mpf; + db_pgno_t meta_pgno; + struct __cq_aq { + } s_links; +}; +struct __db_env { + struct { + } xa_txn; + u_int32_t flags; +}; +typedef enum { MU_REMOVE, MU_RENAME, MU_OPEN } mu_action; +typedef struct __dbpginfo { + u_int8_t type; +} PAGE; +int __db_master_update(mdbp, sdbp, txn, subdb, type, action, newname, flags) + DB *mdbp, *sdbp; +{ + DB_ENV *dbenv; + DBC *dbc, *ndbc; + PAGE *p, *r; + int modify, ret, t_ret; + if ((ret = __db_cursor(mdbp, txn, &dbc, + (((dbenv)->flags & (0x0000002)) + && modify) ? 35 : 0)) != 0) + goto err; + switch (action) { + case MU_REMOVE: + if ((ret = __memp_fget(mdbp->mpf, &sdbp->meta_pgno, 0, &p)) != 0) + goto err; + if ((((PAGE *)p)->type) == 9) { + if ((ret = __db_free(dbc, r)) != 0) { } + } + if ((ret = __db_free(dbc, p)) != 0) { + p = ((void *)0); + goto err; + } + p = ((void *)0); + } + err: + if (ndbc != ((void *)0) && (t_ret = __db_c_close(ndbc)) != 0 && ret == 0) + ret = t_ret; + return (ret); +} + diff --git a/gcc/testsuite/gcc.dg/torture/pr24626-3.c b/gcc/testsuite/gcc.dg/torture/pr24626-3.c new file mode 100644 index 00000000000..77806826814 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr24626-3.c @@ -0,0 +1,18 @@ +/* { dg-do compile } */ + +long fff(int*); + +long F2(int *node) +{ + long call_result = 0; + + if (call_result = fff(node)) + goto error_free_node; + + T(node); + return 0; + +error_free_node: + T(node); + return call_result; +} diff --git a/gcc/testsuite/gcc.dg/torture/pr24626-4.c b/gcc/testsuite/gcc.dg/torture/pr24626-4.c new file mode 100644 index 00000000000..a668016614c --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr24626-4.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ +/* { dg-options "-fmodulo-sched" } */ + +int foo(short* vec1, short* vec2, short* vec3,int len ) +{ + int temp,i; + for (i=0; i