diff options
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/compile/const-high-part.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/const-high-part.c | 19 |
1 files changed, 19 insertions, 0 deletions
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 index 000000000..95e205970 --- /dev/null +++ b/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); +} |