]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/54925 (Segfault in gen_split_910)
authorOleg Endo <olegendo@gcc.gnu.org>
Mon, 15 Oct 2012 22:15:18 +0000 (22:15 +0000)
committerOleg Endo <olegendo@gcc.gnu.org>
Mon, 15 Oct 2012 22:15:18 +0000 (22:15 +0000)
PR target/54925
* gcc.c-torture/compile/pr54925.c: New.

From-SVN: r192482

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/pr54925.c [new file with mode: 0644]

index 31292eab9bedb6d001b952b2ee9b9a15a70ba8d8..45d271c5617b87f18a84ff8a3233767755114b83 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-15  Oleg Endo  <olegendo@gcc.gnu.org>
+
+       PR target/54925
+       * gcc.c-torture/compile/pr54925.c: New.
+
 2012-10-15  Oleg Endo  <olegendo@gcc.gnu.org>
 
        PR target/51244
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54925.c b/gcc/testsuite/gcc.c-torture/compile/pr54925.c
new file mode 100644 (file)
index 0000000..72349c9
--- /dev/null
@@ -0,0 +1,27 @@
+/* PR target/54925  */
+extern int bar;
+extern void foo (int *);
+static unsigned char *
+nr_memcpy (unsigned char *, unsigned char *, unsigned short);
+
+void 
+baz (char *buf, unsigned short len)
+{
+  unsigned char data[10];
+  if (len == 0)
+    return;
+  nr_memcpy (data, (unsigned char *) buf, len);
+  foo (&bar);
+}
+
+static unsigned char *
+nr_memcpy (unsigned char * to, unsigned char * from, unsigned short len)
+{
+  unsigned char *p = to;
+  while (len > 0)
+    {
+      len--;
+      *to++ = *from++;
+    }
+  return p;
+}