diff options
Diffstat (limited to 'sim/testsuite/sim/cris/c/pipe7.c')
-rw-r--r-- | sim/testsuite/sim/cris/c/pipe7.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sim/testsuite/sim/cris/c/pipe7.c b/sim/testsuite/sim/cris/c/pipe7.c new file mode 100644 index 00000000000..552ddb8e1e8 --- /dev/null +++ b/sim/testsuite/sim/cris/c/pipe7.c @@ -0,0 +1,21 @@ +/* Check for proper pipe semantics at corner cases. +#notarget: cris*-*-elf +*/ + +#include <stdio.h> +#include <stdlib.h> +#include <unistd.h> +#include <errno.h> + +int main (void) +{ + if (pipe (NULL) != -1 + || errno != EFAULT) + { + perror ("pipe"); + abort (); + } + + printf ("pass\n"); + exit (0); +} |