2005-10-11 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Oct 2005 15:11:02 +0000 (15:11 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 11 Oct 2005 15:11:02 +0000 (15:11 +0000)
        PR tree-opt/23946
        * gcc.c-torture/compile/pr23946.c: New test.

2005-10-11  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/23946
        * tree-ssa-ccp.c (execute_fold_all_builtins): Call
        mark_new_vars_to_rename instead of update_stmt.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@105239 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr23946.c [new file with mode: 0644]
gcc/tree-ssa-ccp.c

index e1b2fca..c4c063b 100644 (file)
@@ -1,3 +1,9 @@
+2005-10-11  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/23946
+       * tree-ssa-ccp.c (execute_fold_all_builtins): Call
+       mark_new_vars_to_rename instead of update_stmt.
+
 2005-10-11  Bernd Schmidt  <bernd.schmidt@analog.com>
 
        * config/bfin/crti.s (__init, __fini): Renamed from _init, _fini.
index 8ebe56e..96a21e9 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-11  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/23946
+       * gcc.c-torture/compile/pr23946.c: New test.
+
 2005-10-11  Jakub Jelinek  <jakub@redhat.com>
 
        * g++.dg/opt/mmx2.C: New test.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr23946.c b/gcc/testsuite/gcc.c-torture/compile/pr23946.c
new file mode 100644 (file)
index 0000000..ecaa5b1
--- /dev/null
@@ -0,0 +1,72 @@
+
+extern int foo (void);
+
+int
+avi_parse_comments (int fd, char *buf, int space_left)
+{
+  int len = 0, readlen = 0, k;
+  char *data, *c, *d;
+
+  if (fd <= 0 || !buf || space_left <= 0)
+    return -1;
+
+  memset (buf, 0, space_left);
+
+  readlen = foo ();
+  if (!(data = malloc (readlen * sizeof (char) + 1)))
+    return -1;
+
+  c = data;
+  space_left--;
+
+  while (len < space_left)
+    {
+      if (!c || *c == '\0')
+       break;
+      else if (*c == 'I')
+       {
+         d = c + 4;
+
+         k = 0;
+         while (d[k] != '\r' && d[k] != '\n' && d[k] != '\0')
+           ++k;
+         if (k >= space_left)
+           return len;
+
+
+         memcpy (buf + len, c, 4);
+         len += 4;
+
+
+         long2str (buf + len, k + 1);
+         len += 4;
+
+
+         memcpy (buf + len, d, k);
+
+         *(buf + len + k + 1) = '\0';
+
+
+         if ((k + 1) & 1)
+           {
+             k++;
+             *(buf + len + k + 1) = '\0';
+           }
+         len += k + 1;
+
+
+         while (*c != '\n' && *c != '\0')
+           ++c;
+         if (*c != '\0')
+           ++c;
+         else
+           break;
+
+       }
+    }
+  free (data);
+
+  return len;
+}
+
+
index 43b8129..e9e1c0b 100644 (file)
@@ -2460,7 +2460,7 @@ execute_fold_all_builtins (void)
                  gcc_assert (ok);
                }
            }
-         update_stmt (*stmtp);
+         mark_new_vars_to_rename (*stmtp);
          if (maybe_clean_or_replace_eh_stmt (old_stmt, *stmtp)
              && tree_purge_dead_eh_edges (bb))
            cfg_changed = true;