aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/torture
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2006-01-20 09:38:56 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2006-01-20 09:38:56 +0000
commitc11fd0b2064f7a896ed5e958712092ff83232086 (patch)
treee3c7863046f66df41bd3cc06f2b008a5df43f8c3 /gcc/testsuite/gcc.dg/torture
parent74ac79fa800af6de648e984cc5576c20b817839d (diff)
downloadgcc-c11fd0b2064f7a896ed5e958712092ff83232086.zip
gcc-c11fd0b2064f7a896ed5e958712092ff83232086.tar.gz
gcc-c11fd0b2064f7a896ed5e958712092ff83232086.tar.bz2
re PR rtl-optimization/24626 (internal compiler error: verify_flow_info failed)
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. * 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. Co-Authored-By: Steven Bosscher <stevenb.gcc@gmail.com> From-SVN: r110020
Diffstat (limited to 'gcc/testsuite/gcc.dg/torture')
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr24626-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr24626-2.c54
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr24626-3.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr24626-4.c12
4 files changed, 111 insertions, 0 deletions
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 0000000..331c55e
--- /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 0000000..e48d3b3
--- /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 0000000..7780682
--- /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 0000000..a668016
--- /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<len; i++) {
+ temp = vec1[i] * 2;
+ temp += vec2[i] * 3 ;
+ vec3[i] = temp;
+ }
+}