repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR tree-optimization/84740
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
asan
/
pr80166.c
blob
629dd23a31ca76817ddfdd3ca6d85f34bea0935a
1
/* PR sanitizer/80166 */
2
/* { dg-do run } */
3
4
#include <sys/types.h>
5
#include <unistd.h>
6
7
int
8
main
(
int
argc
,
char
**
argv
)
9
{
10
gid_t groups
;
11
int
r
=
getgroups
(
0
, &
groups
);
12
if
(
r
<
0
)
13
__builtin_abort
();
14
15
r
=
getgroups
(-
1
, &
groups
);
16
if
(
r
!= -
1
)
17
__builtin_abort
();
18
19
r
=
getgroups
(-
1
,
NULL
);
20
if
(
r
!= -
1
)
21
__builtin_abort
();
22
23
return
0
;
24
}