aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/const-high-part.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/const-high-part.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/const-high-part.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/const-high-part.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/const-high-part.c
new file mode 100644
index 000000000..95e205970
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/const-high-part.c
@@ -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);
+}