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
d9484c5b
Commit
d9484c5b
authored
Feb 19, 2008
by
Christian Bruel
Committed by
Christian Bruel
Feb 19, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test case for alignment bug in packed structs for STRICT_ALIGNMENT targets
From-SVN: r132415
parent
0e93e1b4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
0 deletions
+44
-0
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/packed-array.c
+40
-0
No files found.
gcc/testsuite/ChangeLog
View file @
d9484c5b
2008
-
02
-
19
Christian
Bruel
<
christian
.
bruel
@st
.
com
>
*
gcc
.
dg
/
packed
-
array
.
c
:
New
testcase
.
2008
-
02
-
19
Uros
Bizjak
<
ubizjak
@gmail
.
com
>
2008
-
02
-
19
Uros
Bizjak
<
ubizjak
@gmail
.
com
>
PR
target
/
33555
PR
target
/
33555
gcc/testsuite/gcc.dg/packed-array.c
0 → 100644
View file @
d9484c5b
/* { dg-do run } */
/* { dg-options "-O2 -fno-inline" } */
struct
usb_interface_descriptor
{
unsigned
short
wMaxPacketSize
;
char
e
;
}
__attribute__
((
packed
));
struct
usb_device
{
int
devnum
;
struct
usb_interface_descriptor
if_desc
[
2
];
};
extern
int
printf
(
const
char
*
,
...);
void
foo
(
unsigned
short
a
)
{
printf
(
"%d
\n
"
,
a
);
}
struct
usb_device
ndev
;
void
usb_set_maxpacket
(
int
n
)
{
int
i
;
for
(
i
=
0
;
i
<
n
;
i
++
)
foo
((
&
ndev
)
->
if_desc
[
i
].
wMaxPacketSize
);
}
int
main
()
{
usb_set_maxpacket
(
2
);
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