OSDN Git Service

2006-01-20 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jan 2006 09:38:56 +0000 (09:38 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 20 Jan 2006 09:38:56 +0000 (09:38 +0000)
Steven Bosscher <stevenb.gcc@gmail.com>

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 <mustafa@il.ibm.com>
* 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

gcc/ChangeLog
gcc/cfgloopmanip.c
gcc/cfgrtl.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/torture/pr24626-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr24626-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr24626-3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/torture/pr24626-4.c [new file with mode: 0644]

index 0a23c22..cf2a597 100644 (file)
@@ -1,3 +1,14 @@
+2006-01-20  Richard Guenther  <rguenther@suse.de>
+       Steven Bosscher <stevenb.gcc@gmail.com>
+
+       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 <mustafa@il.ibm.com>
+       * cfgrtl.c (rtl_verify_flow_info_1): Fix.
+
 2006-01-20  Dirk Mueller  <dmueller@suse.com>
 
         PR c++/5520
index cfc11e0..7d18231 100644 (file)
@@ -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);
 
index 7652472..11393b0 100644 (file)
@@ -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)))
index c0cc342..78e2311 100644 (file)
@@ -1,3 +1,12 @@
+2006-01-20  Richard Guenther  <rguenther@suse.de>
+       Steven Bosscher <stevenb.gcc@gmail.com>
+
+       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  <dmueller@suse.com>
 
         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 (file)
index 0000000..331c55e
--- /dev/null
@@ -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 (file)
index 0000000..e48d3b3
--- /dev/null
@@ -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 (file)
index 0000000..7780682
--- /dev/null
@@ -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 (file)
index 0000000..a668016
--- /dev/null
@@ -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<len; i++) {
+                 temp = vec1[i] * 2;
+                 temp += vec2[i] * 3 ;
+                 vec3[i] = temp;
+        }
+}