diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/pr119204.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/pr119204.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/pr119204.c b/gcc/testsuite/gcc.dg/pr119204.c new file mode 100644 index 0000000..ecbd8dd1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr119204.c @@ -0,0 +1,13 @@ +/* { dg-do compile } */ +/* { dg-options "-w" } */ + +extern void abort(void); +extern long long strcspn(const char *, const char *); + +void main_test(void) { + const char *const s1 = "hello world"; + char dst[64], *d2; + + if (strcspn(++d2 + 5, "") != 5 || d2 != dst + 1) + abort(); +} |