Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
5b8f8eeb
Commit
5b8f8eeb
authored
Nov 05, 1997
by
Jeff Law
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test.
From-SVN: r16340
parent
f4e31cf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
gcc/testsuite/gcc.c-torture/compile/971104-1.c
+26
-0
No files found.
gcc/testsuite/gcc.c-torture/compile/971104-1.c
0 → 100644
View file @
5b8f8eeb
typedef
unsigned
short
ushort
;
struct
sembuf
{
ushort
sem_num
;
short
sem_op
;
short
sem_flg
;
};
union
semun
{
int
val
;
struct
semid_ds
*
buf
;
ushort
*
array
;
struct
seminfo
*
__buf
;
void
*
__pad
;
};
static
union
semun
semctl_arg
;
static
int
semid
;
static
void
up
(
int
sem
){
struct
sembuf
sb
;
sb
.
sem_num
=
(
unsigned
short
)
sem
;
sb
.
sem_op
=
1
;
sb
.
sem_flg
=
0x1000
;
if
(
semop
(
semid
,
&
sb
,
1
)
==
-
1
)
error
(
"up failure"
);
if
(
semctl
(
semid
,
sb
.
sem_num
,
12
,
semctl_arg
)
==
0
)
printf
(
"%s had processes sleeping on it!
\n
"
,
({
"MUTEX "
,
"BARB_SEM 1"
,
"BARB_SEM 2"
,
"CUST_SEM 1"
,
"CUST_SEM 2"
,
"WA
IT_SEM 1"
,
"WAIT_SEM 2"
,
"WAIT_SEM 3"
,
"WAIT_SEM 4"
}
[(
sb
.
sem_num
)])
);
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment