OSDN Git Service

2006-09-16 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Sep 2006 22:52:11 +0000 (22:52 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Sep 2006 22:52:11 +0000 (22:52 +0000)
        PR tree-opt/29059
        * gcc.c-torture/compile/strcpy-1.c: New test.
        * gcc.c-torture/compile/strcpy-2.c: New test.
        * gcc.c-torture/compile/memcpy-1.c: New test.
        * gcc.c-torture/compile/memcpy-2.c: New test.

2006-09-16  Andrew Pinski  <pinskia@physics.uc.edu>

        PR tree-opt/29059
        * tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right
        away for the expr argument.

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/memcpy-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/memcpy-2.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/strcpy-1.c [new file with mode: 0644]
gcc/testsuite/gcc.c-torture/compile/strcpy-2.c [new file with mode: 0644]
gcc/tree-ssa-propagate.c

index df7c5e3..5c2cf3d 100644 (file)
@@ -1,10 +1,17 @@
+2006-09-16  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/29059
+       * tree-ssa-propagate.c (set_rhs): Reject MODIFY_EXPR right
+       away for the expr argument.
+
 2006-09-16  Steven Bosscher  <steven@gcc.gnu.org>
 
+       PR tree-opt/27742
        * tree-vectorizer.c (vectorize_loops): Clear vect_loop_location
        before using it for dumping after vectorizing loops.
 
-2006-09-16   Andrew Pinski  <pinskia@physics.uc.edu>
-            Jack Howarth  <howarth@bromo.med.uc.edu>
+2006-09-16  Andrew Pinski  <pinskia@physics.uc.edu>
+           Jack Howarth  <howarth@bromo.med.uc.edu>
 
        PR target/29030
        * config/rs6000/rs6000.c (rs6000_darwin64_record_arg_advance_recurse)
index 357a379..6a27b73 100644 (file)
@@ -1,3 +1,11 @@
+2006-09-16  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR tree-opt/29059
+       * gcc.c-torture/compile/strcpy-1.c: New test.
+       * gcc.c-torture/compile/strcpy-2.c: New test.
+       * gcc.c-torture/compile/memcpy-1.c: New test.
+       * gcc.c-torture/compile/memcpy-2.c: New test.
+
 2006-09-16  Jack Howarth  <howarth@bromo.med.uc.edu>
 
        PR testsuite/29055
diff --git a/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c b/gcc/testsuite/gcc.c-torture/compile/memcpy-1.c
new file mode 100644 (file)
index 0000000..4a4e750
--- /dev/null
@@ -0,0 +1,9 @@
+static const char OggFLAC__MAPPING_VERSION_MAJOR = 1;
+void f(void)
+{
+  char synthetic_first_packet_body[10];
+  char *b = &synthetic_first_packet_body[4];
+  __builtin_memcpy (b, &OggFLAC__MAPPING_VERSION_MAJOR, (1u));
+}
+
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c b/gcc/testsuite/gcc.c-torture/compile/memcpy-2.c
new file mode 100644 (file)
index 0000000..4645ced
--- /dev/null
@@ -0,0 +1,10 @@
+static const char OggFLAC__MAPPING_VERSION_MAJOR = 1;
+void f(void)
+{
+  char synthetic_first_packet_body[10];
+  char *b = synthetic_first_packet_body;
+  b+=4u;
+  __builtin_memcpy (b, &OggFLAC__MAPPING_VERSION_MAJOR, (1u));
+}
+
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c b/gcc/testsuite/gcc.c-torture/compile/strcpy-1.c
new file mode 100644 (file)
index 0000000..2c7b16a
--- /dev/null
@@ -0,0 +1,15 @@
+
+
+typedef struct
+{
+  char str[20];
+}STACK;
+STACK stack[15];
+int level;
+rezero ()
+{
+  level = 0;
+  __builtin_strcpy (stack[level].str, "");
+}
+
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c b/gcc/testsuite/gcc.c-torture/compile/strcpy-2.c
new file mode 100644 (file)
index 0000000..075cdd1
--- /dev/null
@@ -0,0 +1,7 @@
+char wrkstr_un[270];
+extern void
+LoadUserAlph (char *s)
+{
+  s = &wrkstr_un[0];
+  __builtin_strcpy (s, "");
+};
index 00d5a94..111b39d 100644 (file)
@@ -588,7 +588,8 @@ set_rhs (tree *stmt_p, tree expr)
          && !is_gimple_val (TREE_OPERAND (TREE_OPERAND (expr, 0), 1)))
        return false;
     }
-  else if (code == COMPOUND_EXPR)
+  else if (code == COMPOUND_EXPR
+          || code == MODIFY_EXPR)
     return false;
 
   switch (TREE_CODE (stmt))