repo.or.cz
/
official-gcc
/
graphite-test-results.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Fix unused warnings.
[official-gcc/graphite-test-results.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
vector-1.c
blob
ff21d68ca7be8e7cab83b57bd495f1aa788739bb
1
/* Check that vector extraction works correctly. */
2
3
#define vector __attribute__((vector_size(16) ))
4
5
int
f0
(
vector
int
t
)
6
{
7
return
((
int
*)&
t
)[
0
];
8
}
9
int
f1
(
vector
int
t
)
10
{
11
return
((
int
*)&
t
)[
1
];
12
}
13
int
f2
(
vector
int
t
)
14
{
15
return
((
int
*)&
t
)[
2
];
16
}
17
int
f3
(
vector
int
t
)
18
{
19
return
((
int
*)&
t
)[
3
];
20
}
21
int
main
(
void
)
22
{
23
vector
int
a
= {
0
,
1
,
2
,
3
};
24
/* Make sure that we have the correct size for the vectors. */
25
if
(
sizeof
(
int
) !=
4
)
26
__builtin_exit
(
0
);
27
if
(
f0
(
a
) !=
0
)
28
__builtin_abort
();
29
if
(
f1
(
a
) !=
1
)
30
__builtin_abort
();
31
if
(
f2
(
a
) !=
2
)
32
__builtin_abort
();
33
if
(
f3
(
a
) !=
3
)
34
__builtin_abort
();
35
return
0
;
36
}