* testsuite/gcc.c-torture/execute/20020118-1.c: New test.
authorKazu Hirata <kazu@hxi.com>
Fri, 18 Jan 2002 17:21:40 +0000 (17:21 +0000)
committerKazu Hirata <kazu@gcc.gnu.org>
Fri, 18 Jan 2002 17:21:40 +0000 (17:21 +0000)
From-SVN: r48991

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

index e72961a11a9786c6067ae18c05598fbfdcd43490..faf9136a209003989196fe217b9dcb3ea3ccea1a 100644 (file)
@@ -1,3 +1,7 @@
+2002-01-18  Kazu Hirata  <kazu@hxi.com>
+
+       * testsuite/gcc.c-torture/execute/20020118-1.c: New test.
+
 2001-01-18  David Billinghurst <David.Billinghurst@riotinto.com>
 
        * g++.dg/other/deprecated.C: Fix FAIL from 
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020118-1.c b/gcc/testsuite/gcc.c-torture/execute/20020118-1.c
new file mode 100644 (file)
index 0000000..44bf67e
--- /dev/null
@@ -0,0 +1,33 @@
+/* This tests an insn length of sign extention on h8300 port.  */
+
+extern void exit (int);
+
+volatile signed char *q;
+volatile signed int n;
+
+void
+foo (void)
+{
+  signed char *p;
+
+  for (;;)
+    {
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+      p = (signed char *) q; n = p[2];
+    }
+}
+
+int
+main ()
+{
+  exit (0);
+}