repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
loop-13.c
blob
232621efab1c22eaf5020d1ce8cb67903ead5238
1
/* PR opt/7130 */
2
void
abort
(
void
);
3
#define TYPE long
4
5
void
6
scale
(
TYPE
*
alpha
,
TYPE
*
x
,
int
n
)
7
{
8
int
i
,
ix
;
9
10
if
(*
alpha
!=
1
)
11
for
(
i
=
0
,
ix
=
0
;
i
<
n
;
i
++,
ix
+=
2
)
12
{
13
TYPE tmpr
,
tmpi
;
14
tmpr
= *
alpha
*
x
[
ix
];
15
tmpi
= *
alpha
*
x
[
ix
+
1
];
16
x
[
ix
] =
tmpr
;
17
x
[
ix
+
1
] =
tmpi
;
18
}
19
}
20
21
int
22
main
(
void
)
23
{
24
int
i
;
25
TYPE x
[
10
];
26
TYPE alpha
=
2
;
27
28
for
(
i
=
0
;
i
<
10
;
i
++)
29
x
[
i
] =
i
;
30
31
scale
(&
alpha
,
x
,
5
);
32
33
if
(
x
[
9
] !=
18
)
34
abort
();
35
36
return
0
;
37
}