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
tree-optimization/111233 - loop splitting miscompile
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr77478.c
blob
b5965bf574fd1e2eabcca73ddc44bae06d7f5cf2
1
/* { dg-do run } */
2
/* { dg-additional-options "-ffast-math" } */
3
4
static const float
A
[
10
] = {
1
};
5
6
float
7
foo
(
float
*
f
,
int
n
)
8
{
9
int
i
,
j
;
10
float
a
=
0
,
b
=
0
;
11
for
(
i
=
n
/
2
;
i
<
n
;
i
++)
12
a
+=
f
[
i
]*
.1
f
;
13
for
(
i
=
n
/
2
,
j
=
0
;
i
<
n
;
i
++,
j
++)
14
b
+=
f
[
i
]*
A
[
j
]+
a
*
A
[
j
];
15
return
b
;
16
}
17
18
int
main
()
19
{
20
float
a
[
21
] = {
0
};
21
return
foo
(
a
+
1
,
20
) +
foo
(
a
,
20
);
22
}