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
6ae504c9
Commit
6ae504c9
authored
Mar 19, 2002
by
Jakub Jelinek
Committed by
Jakub Jelinek
Mar 19, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/struct-by-value-1.c: New test.
From-SVN: r51026
parent
f735a153
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
85 additions
and
0 deletions
+85
-0
gcc/testsuite/ChangeLog
+2
-0
gcc/testsuite/gcc.dg/struct-by-value-1.c
+83
-0
No files found.
gcc/testsuite/ChangeLog
View file @
6ae504c9
...
@@ -2,6 +2,8 @@
...
@@ -2,6 +2,8 @@
* gcc.c-torture/compile/20020318-1.c: New test.
* gcc.c-torture/compile/20020318-1.c: New test.
* gcc.dg/struct-by-value-1.c: New test.
2002-03-18 Jakub Jelinek <jakub@redhat.com>
2002-03-18 Jakub Jelinek <jakub@redhat.com>
* g++.dg/opt/conj1.C: New test.
* g++.dg/opt/conj1.C: New test.
...
...
gcc/testsuite/gcc.dg/struct-by-value-1.c
0 → 100644
View file @
6ae504c9
/* Test structure passing by value. */
/* { dg-do run } */
/* { dg-options "-O2" } */
#define T(N) \
struct S##N { unsigned char i[N]; }; \
struct S##N g1s##N, g2s##N, g3s##N; \
\
void \
init##N (struct S##N *p, int i) \
{ \
int j; \
for (j = 0; j < N; j++) \
p->i[j] = i + j; \
} \
\
void \
check##N (struct S##N *p, int i) \
{ \
int j; \
for (j = 0; j < N; j++) \
if (p->i[j] != i + j) abort (); \
} \
\
void \
test##N (struct S##N s1, struct S##N s2, \
struct S##N s3) \
{ \
check##N (&s1, 64); \
check##N (&s2, 128); \
check##N (&s3, 192); \
} \
\
void \
test2_##N (struct S##N s1, struct S##N s2) \
{ \
test##N (s1, g2s##N, s2); \
} \
\
void \
testit##N (void) \
{ \
init##N (&g1s##N, 64); \
check##N (&g1s##N, 64); \
init##N (&g2s##N, 128); \
check##N (&g2s##N, 128); \
init##N (&g3s##N, 192); \
check##N (&g3s##N, 192); \
test##N (g1s##N, g2s##N, g3s##N); \
test2_##N (g1s##N, g3s##N); \
}
extern
void
abort
(
void
);
extern
void
exit
(
int
);
T
(
0
)
T
(
1
)
T
(
2
)
T
(
3
)
T
(
4
)
T
(
5
)
T
(
6
)
T
(
7
)
T
(
8
)
T
(
9
)
T
(
10
)
T
(
11
)
T
(
12
)
T
(
13
)
T
(
14
)
T
(
15
)
T
(
16
)
T
(
17
)
T
(
18
)
T
(
19
)
T
(
20
)
T
(
21
)
T
(
22
)
T
(
23
)
T
(
24
)
T
(
25
)
T
(
26
)
T
(
27
)
T
(
28
)
T
(
29
)
T
(
30
)
T
(
31
)
T
(
32
)
T
(
33
)
T
(
34
)
T
(
35
)
T
(
36
)
T
(
37
)
T
(
38
)
T
(
39
)
T
(
40
)
T
(
41
)
T
(
42
)
T
(
43
)
T
(
44
)
T
(
45
)
T
(
46
)
T
(
47
)
T
(
48
)
T
(
49
)
T
(
50
)
T
(
51
)
T
(
52
)
T
(
53
)
T
(
54
)
T
(
55
)
T
(
56
)
T
(
57
)
T
(
58
)
T
(
59
)
T
(
60
)
T
(
61
)
T
(
62
)
T
(
63
)
#undef T
int
main
()
{
#define T(N) testit##N ();
T
(
0
)
T
(
1
)
T
(
2
)
T
(
3
)
T
(
4
)
T
(
5
)
T
(
6
)
T
(
7
)
T
(
8
)
T
(
9
)
T
(
10
)
T
(
11
)
T
(
12
)
T
(
13
)
T
(
14
)
T
(
15
)
T
(
16
)
T
(
17
)
T
(
18
)
T
(
19
)
T
(
20
)
T
(
21
)
T
(
22
)
T
(
23
)
T
(
24
)
T
(
25
)
T
(
26
)
T
(
27
)
T
(
28
)
T
(
29
)
T
(
30
)
T
(
31
)
T
(
32
)
T
(
33
)
T
(
34
)
T
(
35
)
T
(
36
)
T
(
37
)
T
(
38
)
T
(
39
)
T
(
40
)
T
(
41
)
T
(
42
)
T
(
43
)
T
(
44
)
T
(
45
)
T
(
46
)
T
(
47
)
T
(
48
)
T
(
49
)
T
(
50
)
T
(
51
)
T
(
52
)
T
(
53
)
T
(
54
)
T
(
55
)
T
(
56
)
T
(
57
)
T
(
58
)
T
(
59
)
T
(
60
)
T
(
61
)
T
(
62
)
T
(
63
)
#undef T
exit
(
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