OSDN Git Service

Add testcases for PR43464.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Mar 2010 18:37:22 +0000 (18:37 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 31 Mar 2010 18:37:22 +0000 (18:37 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157886 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog.graphite
gcc/testsuite/gcc.dg/graphite/id-pr43464-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/graphite/id-pr43464.c [new file with mode: 0644]

index 785ded3..9b55225 100644 (file)
@@ -1,3 +1,31 @@
+2010-03-23  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * tree-ssa-copy.c: Revert this previous change:
+       (init_copy_prop): Loop closed phi nodes cancontain more than one
+       argument.
+       (execute_copy_prop): Revert the previous change: do not call
+       rewrite_into_loop_closed_ssa.
+
+2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
+           Richard Guenther  <rguenther@suse.de>
+
+       PR middle-end/43464
+       * tree-ssa-copy.c (init_copy_prop): Loop closed phi nodes can
+       contain more than one argument.
+       (execute_copy_prop): Revert the previous change: do not call
+       rewrite_into_loop_closed_ssa.
+
+       * gcc.dg/graphite/id-pr43464.c: Remove compile warning.
+       * gcc.dg/graphite/id-pr43464-1.c: New.
+
+2010-03-21  Sebastian Pop  <sebastian.pop@amd.com>
+
+       PR middle-end/43464
+       * tree-ssa-copy.c (execute_copy_prop): Call rewrite_into_loop_closed_ssa
+       and verify_loop_closed_ssa when copy prop is executed in the LNO.
+
+       * gcc.dg/graphite/id-pr43464.c: New.
+
 2010-03-16  Sebastian Pop  <sebastian.pop@amd.com>
 
        * graphite-sese-to-poly.c (graphite_loop_normal_form): Add the IV bump
diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr43464-1.c b/gcc/testsuite/gcc.dg/graphite/id-pr43464-1.c
new file mode 100644 (file)
index 0000000..d5a8359
--- /dev/null
@@ -0,0 +1,18 @@
+typedef struct regnode
+{
+  char flags;
+} regnode;
+extern const unsigned char A[];
+
+char *foo (regnode *c, char *s, int norun)
+{
+  int uskip;
+  while (s + (uskip = A[*s]))
+    {
+      if ((c->flags || bar (c)) && norun)
+       goto got_it;
+      s += uskip;
+    }
+ got_it:
+  return s;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/id-pr43464.c b/gcc/testsuite/gcc.dg/graphite/id-pr43464.c
new file mode 100644 (file)
index 0000000..a8e67dc
--- /dev/null
@@ -0,0 +1,63 @@
+typedef struct sv SV;
+typedef struct regnode
+{
+  char flags;
+} regnode;
+typedef struct regexp
+{
+} regexp;
+typedef struct cop
+{
+  SV *cop_warnings;
+} COP;
+extern const unsigned char PL_utf8skip[];
+extern char PL_dowarn;
+extern COP *volatile PL_curcop;
+char *
+S_find_byclass (regexp * prog, regnode * c, char *s, char *strend,
+               char *startpos, int norun)
+{
+  register long unsigned int uskip;
+  char *e;
+  switch (((c)->flags))
+    {
+    case 17:
+       {
+         while (s + (uskip = PL_utf8skip[*s]) <= strend)
+           {
+             if (c->flags || S_reginclass (c))
+                 if (norun || S_regtry (prog, s))
+                   goto got_it;
+             s += uskip;
+           }
+         unsigned long c, f;
+         long unsigned int len;
+           {
+             while (s <= e)
+               {
+                 c = Perl_utf8n_to_uvuni (s, 13, &len,
+                                          (((PL_curcop->cop_warnings !=
+                                             ((SV *) ((void *) 0)))
+                                            && PL_dowarn)) ? 0 : 0x00FF);
+                 if (c == 0 && (norun || S_regtry (prog, s)))
+                     if (f != c && (norun || S_regtry (prog, s)))
+                       goto got_it;
+               }
+           }
+       }
+    }
+got_it:
+  return s;
+}
+Perl_re_intuit_start (regexp * prog)
+{
+  S_find_byclass (prog, 0, 0, 0, 0, 1);
+}
+Perl_regexec_flags (register regexp * prog,
+                   register char *strend)
+{
+  S_find_byclass (prog, 0, 0, strend, 0, 0);
+}
+S_regtry (regexp * prog, char *startpos)
+{
+}