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
b081ed4e
Commit
b081ed4e
authored
Feb 03, 2016
by
H.J. Lu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add the new IA MCU test
From-SVN: r233109
parent
ab4bae0c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
61 additions
and
0 deletions
+61
-0
gcc/testsuite/gcc.target/i386/iamcu/test_empty_structs_and_unions.c
+61
-0
No files found.
gcc/testsuite/gcc.target/i386/iamcu/test_empty_structs_and_unions.c
0 → 100644
View file @
b081ed4e
/* This tests passing and returning of empty structures and unions. */
#include "defines.h"
#include "args.h"
struct
IntegerRegisters
iregbits
=
{
~
0
,
~
0
,
~
0
,
~
0
,
~
0
,
~
0
};
struct
IntegerRegisters
iregs
;
unsigned
int
num_iregs
;
struct
empty_struct
{
};
struct
empty_struct
check_struct_passing
(
struct
empty_struct
s0
ATTRIBUTE_UNUSED
,
struct
empty_struct
s1
ATTRIBUTE_UNUSED
,
int
i0
ATTRIBUTE_UNUSED
)
{
struct
empty_struct
s
;
check_int_arguments
;
return
s
;
}
#define check_struct_passing WRAP_CALL(check_struct_passing)
union
empty_union
{
};
union
empty_union
check_union_passing
(
union
empty_union
u0
ATTRIBUTE_UNUSED
,
union
empty_union
u1
ATTRIBUTE_UNUSED
,
int
i0
ATTRIBUTE_UNUSED
)
{
union
empty_union
u
;
check_int_arguments
;
return
u
;
}
#define check_union_passing WRAP_CALL(check_union_passing)
int
main
(
void
)
{
struct
empty_struct
s
;
union
empty_union
u
;
clear_struct_registers
;
iregs
.
I0
=
32
;
num_iregs
=
1
;
clear_int_hardware_registers
;
check_union_passing
(
u
,
u
,
32
);
clear_struct_registers
;
iregs
.
I0
=
33
;
num_iregs
=
1
;
clear_int_hardware_registers
;
check_struct_passing
(
s
,
s
,
33
);
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