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
c499d4d2
Commit
c499d4d2
authored
Jan 24, 2001
by
Richard Henderson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New test.
From-SVN: r39252
parent
304a22dd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
0 deletions
+50
-0
gcc/testsuite/gcc.c-torture/execute/20010124-1.c
+50
-0
No files found.
gcc/testsuite/gcc.c-torture/execute/20010124-1.c
0 → 100644
View file @
c499d4d2
/* Verify that structure return doesn't invoke memcpy on
overlapping objects. */
extern
void
abort
(
void
);
typedef
__SIZE_TYPE__
size_t
;
struct
S
{
char
stuff
[
1024
];
};
union
U
{
struct
{
int
space
;
struct
S
s
;
}
a
;
struct
{
struct
S
s
;
int
space
;
}
b
;
};
static
struct
S
f
(
struct
S
*
);
static
void
g
(
union
U
*
);
int
main
()
{
union
U
u
;
u
.
b
.
s
=
f
(
&
u
.
a
.
s
);
u
.
a
.
s
=
f
(
&
u
.
b
.
s
);
g
(
&
u
);
return
0
;
}
static
struct
S
f
(
struct
S
*
p
)
{
return
*
p
;
}
static
void
g
(
union
U
*
p
)
{
}
static
void
*
memcpy
(
void
*
a
,
const
void
*
b
,
size_t
len
)
{
if
(
a
<
b
&&
a
+
len
>
b
)
abort
();
if
(
b
<
a
&&
b
+
len
>
a
)
abort
();
return
a
;
}
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