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
69aeb34f
Commit
69aeb34f
authored
Dec 18, 2013
by
Nick Clifton
Committed by
Nick Clifton
Dec 18, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.dg/pr32912-2.c: Fix for 16-bit targets.
From-SVN: r206089
parent
871a3886
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gcc.dg/pr32912-2.c
+16
-9
No files found.
gcc/testsuite/ChangeLog
View file @
69aeb34f
2013-12-18 Nick Clifton <nickc@redhat.com>
* gcc.dg/pr32912-2.c: Fix for 16-bit targets.
2013-12-18 Eric Botcazou <ebotcazou@adacore.com>
* gcc.dg/pr59418.c: New test.
...
...
gcc/testsuite/gcc.dg/pr32912-2.c
View file @
69aeb34f
/* { dg-do run } */
/* { dg-options "-O2 -w" } */
/* { dg-skip-if "TImode not supported" { "avr-*-*" } { "*" } { "" } } */
extern
void
abort
(
void
);
#if(__SIZEOF_INT__ >= 4)
typedef
int
__m128i
__attribute__
((
__vector_size__
(
16
)));
# define TYPE int
# define TYPED(a) a
#elif(__SIZEOF_INT__ > 2)
# define TYPE long
# define TYPED(a) a##L
#else
typedef
long
__m128i
__attribute__
((
__vector_size__
(
16
)));
# define TYPE long long
# define TYPED(a) a##LL
#endif
typedef
TYPE
__m128i
__attribute__
((
__vector_size__
(
16
)));
__m128i
foo
(
void
)
{
...
...
@@ -26,11 +36,7 @@ bar (void)
int
main
(
void
)
{
#if(__SIZEOF_INT__ >= 4)
union
{
__m128i
v
;
int
i
[
sizeof
(
__m128i
)
/
sizeof
(
int
)];
}
u
,
v
;
#else
union
{
__m128i
v
;
long
i
[
sizeof
(
__m128i
)
/
sizeof
(
long
)];
}
u
,
v
;
#endif
union
{
__m128i
v
;
TYPE
i
[
sizeof
(
__m128i
)
/
sizeof
(
TYPE
)];
}
u
,
v
;
int
i
;
u
.
v
=
foo
();
...
...
@@ -39,9 +45,10 @@ main (void)
{
if
(
u
.
i
[
i
]
!=
~
v
.
i
[
i
])
abort
();
if
(
i
<
3
)
{
if
(
u
.
i
[
i
]
!=
(
0x11111111
<<
i
))
if
(
u
.
i
[
i
]
!=
(
TYPED
(
0x11111111
)
<<
i
))
abort
();
}
else
if
(
u
.
i
[
i
])
...
...
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