]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/19005 (Error: bad register name `%sil')
authorJakub Jelinek <jakub@redhat.com>
Thu, 8 Dec 2005 21:49:17 +0000 (22:49 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 8 Dec 2005 21:49:17 +0000 (22:49 +0100)
PR target/19005
* gcc.c-torture/execute/pr19005.c: New test.

From-SVN: r108246

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

index 4eeec97c524376d20c7b06aef279f3117d45c1eb..958708256a58f90bcee7f6988b45a490d3fca5d3 100644 (file)
@@ -1,5 +1,8 @@
 2005-12-08  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/19005
+       * gcc.c-torture/execute/pr19005.c: New test.
+
        PR target/17828
        * g++.old-deja/g++.other/comdat5.C: New test.
        * g++.old-deja/g++.other/comdat5-aux.cc: New file.
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr19005.c b/gcc/testsuite/gcc.c-torture/execute/pr19005.c
new file mode 100644 (file)
index 0000000..c36b388
--- /dev/null
@@ -0,0 +1,38 @@
+/* PR target/19005 */
+extern void abort (void);
+
+int v, s;
+
+void
+bar (int a, int b)
+{
+  unsigned char x = v;
+
+  if (!s)
+    {
+      if (a != x || b != (unsigned char) (x + 1))
+        abort ();
+    }
+  else if (a != (unsigned char) (x + 1) || b != x)
+    abort ();
+  s ^= 1;
+}
+
+int
+foo (int x)
+{
+  unsigned char a = x, b = x + 1;
+
+  bar (a, b);
+  a ^= b; b ^= a; a ^= b;
+  bar (a, b);
+  return 0;
+}
+
+int
+main (void)
+{
+  for (v = -10; v < 266; v++)
+    foo (v);
+  return 0;
+}