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
428a1c1c
Commit
428a1c1c
authored
Sep 10, 2001
by
Zack Weinberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test case (2.95.2 miscompilation)
From-SVN: r45505
parent
402209ff
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
59 additions
and
0 deletions
+59
-0
gcc/testsuite/gcc.c-torture/execute/20010910-1.c
+59
-0
No files found.
gcc/testsuite/gcc.c-torture/execute/20010910-1.c
0 → 100644
View file @
428a1c1c
/* Test case contributed by Ingo Rohloff <rohloff@in.tum.de>.
Code distilled from Linux kernel. */
/* Compile this program with a gcc-2.95.2 using
"gcc -O2" and run it. The result will be that
rx_ring[1].next == 0 (it should be == 14)
and
ep.skbuff[4] == 5 (it should be 0)
*/
extern
void
abort
(
void
);
struct
epic_rx_desc
{
unsigned
int
next
;
};
struct
epic_private
{
struct
epic_rx_desc
*
rx_ring
;
unsigned
int
rx_skbuff
[
5
];
};
static
void
epic_init_ring
(
struct
epic_private
*
ep
)
{
int
i
;
for
(
i
=
0
;
i
<
5
;
i
++
)
{
ep
->
rx_ring
[
i
].
next
=
10
+
(
i
+
1
)
*
2
;
ep
->
rx_skbuff
[
i
]
=
0
;
}
ep
->
rx_ring
[
i
-
1
].
next
=
10
;
}
static
int
check_rx_ring
[
5
]
=
{
12
,
14
,
16
,
18
,
10
};
int
main
(
void
)
{
struct
epic_private
ep
;
struct
epic_rx_desc
rx_ring
[
5
];
int
i
;
for
(
i
=
0
;
i
<
5
;
i
++
)
{
rx_ring
[
i
].
next
=
0
;
ep
.
rx_skbuff
[
i
]
=
5
;
}
ep
.
rx_ring
=
rx_ring
;
epic_init_ring
(
&
ep
);
for
(
i
=
0
;
i
<
5
;
i
++
)
{
if
(
rx_ring
[
i
].
next
!=
check_rx_ring
[
i
]
)
abort
();
if
(
ep
.
rx_skbuff
[
i
]
!=
0
)
abort
();
}
return
0
;
}
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