* gcc.target/mips/const-high-part.c: New test.
authorJames E. Wilson <wilson@codesourcery.com>
Thu, 7 May 2009 00:24:53 +0000 (00:24 +0000)
committerJim Wilson <wilson@gcc.gnu.org>
Thu, 7 May 2009 00:24:53 +0000 (17:24 -0700)
From-SVN: r147213

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

index 08c7a9a..cd764f8 100644 (file)
@@ -1,3 +1,7 @@
+2009-05-06  James E. Wilson  <wilson@codesourcery.com>
+
+       * gcc.target/mips/const-high-part.c: New test.
+
 2009-05-06  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR testsuite/40050
diff --git a/gcc/testsuite/gcc.c-torture/compile/const-high-part.c b/gcc/testsuite/gcc.c-torture/compile/const-high-part.c
new file mode 100644 (file)
index 0000000..95e2059
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target size32plus } */
+
+char *buf;
+int buflen;
+
+inline int
+sub (int length)
+{
+  if (length <= buflen)
+    buf[length] = '\0';
+  return 0;
+}
+
+int
+sub2 (void)
+{
+  return sub (0x7fffffff);
+}