diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-30 23:54:31 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-06-30 23:54:31 +0000 |
commit | 4894c5a3c3355813b9bbcda2776884996d50f9ad (patch) | |
tree | 2dbc04d0eb1440fe4c76701102b0347aefa513a7 /gcc/testsuite/gcc.c-torture/execute/980701-1.c | |
parent | 50127a6ea08c7101b9c0661900bfc1c0d524ef7f (diff) | |
download | gcc-4894c5a3c3355813b9bbcda2776884996d50f9ad.tar.gz |
* gcc.c-torture/execute/980701-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@20860 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.c-torture/execute/980701-1.c')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/980701-1.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/980701-1.c b/gcc/testsuite/gcc.c-torture/execute/980701-1.c new file mode 100644 index 00000000000..391cc0ee1c2 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/980701-1.c @@ -0,0 +1,22 @@ +ns_name_skip (unsigned char **x, unsigned char *y) +{ + *x = 0; + return 0; +} + +unsigned char a[2]; + +int dn_skipname(unsigned char *ptr, unsigned char *eom) { + unsigned char *saveptr = ptr; + + if (ns_name_skip(&ptr, eom) == -1) + return (-1); + return (ptr - saveptr); +} + +main() +{ + if (dn_skipname (&a[0], &a[1]) == 0) + abort (); + exit (0); +} |