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