diff options
author | sirl <sirl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-08 23:49:43 +0000 |
---|---|---|
committer | sirl <sirl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-04-08 23:49:43 +0000 |
commit | ac09d8f9f7d23f832d545d71459cb91865962665 (patch) | |
tree | c0de6e22179e7b55523f7b24f516696ec007afeb /gcc/testsuite | |
parent | 3a4657de4bf1b1f9c078fe38464002f518482e14 (diff) | |
download | gcc-ac09d8f9f7d23f832d545d71459cb91865962665.tar.gz |
2001-04-08 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* gcc.c-torture/compile/20010408-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@41193 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20010408-1.c | 77 |
2 files changed, 81 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9d8f5922533..6664b42cf1b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-04-08 Franz Sirl <Franz.Sirl-kernel@lauterbach.com> + + * gcc.c-torture/execute/20010408-1.c: New test. + 2001-04-06 Benjamin Kosnik <bkoz@redhat.com> * g++.old-deja/g++.benjamin/15071.C (main): Update to conformant diff --git a/gcc/testsuite/gcc.c-torture/compile/20010408-1.c b/gcc/testsuite/gcc.c-torture/compile/20010408-1.c new file mode 100644 index 00000000000..9aa3597a24a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20010408-1.c @@ -0,0 +1,77 @@ +extern struct win *windows, *wtab[]; +struct win +{ + struct win *w_next; +}; + +struct auser; + +struct comm +{ + char *name; + int flags; +}; + +extern struct comm comms[]; + +extern int WindowByNoN (char *); +extern int FindCommnr (char *); +extern int AclSetPermCmd (struct auser *, char *, struct comm *); +extern int AclSetPermWin (struct auser *, struct auser *, char *, struct win *); + + +int + AclSetPerm(uu, u, mode, s) + struct auser *uu, *u; +char *mode, *s; +{ + struct win *w; + int i; + char *p, ch; + + do + { + } + while (0); + + while (*s) + { + switch (*s) + { + case '*': + return AclSetPerm(uu, u, mode, "#?"); + case '#': + if (uu) + AclSetPermWin(uu, u, mode, (struct win *)1); + else + for (w = windows; w; w = w->w_next) + AclSetPermWin((struct auser *)0, u, mode, w); + s++; + break; + case '?': + if (uu) + AclSetPermWin(uu, u, mode, (struct win *)0); + else + for (i = 0; i <= 174; i++) + AclSetPermCmd(u, mode, &comms[i]); + s++; + break; + default: + for (p = s; *p && *p != ' ' && *p != '\t' && *p != ','; p++) + ; + if ((ch = *p)) + *p++ = '\0'; + if ((i = FindCommnr(s)) != -1) + AclSetPermCmd(u, mode, &comms[i]); + else if (((i = WindowByNoN(s)) >= 0) && wtab[i]) + AclSetPermWin((struct auser *)0, u, mode, wtab[i]); + else + return -1; + if (ch) + p[-1] = ch; + s = p; + } + } + + return 0; +} |