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
libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr85989.c
blob
4dff5e69089180d0f712b7801f4270c0763381f8
1
/* { dg-do run } */
2
3
#define N 9
4
5
void
__attribute__
((
noipa
))
6
f
(
double
x
,
double
y
,
double
*
res
)
7
{
8
y
= -
y
;
9
for
(
int
i
=
0
;
i
<
N
; ++
i
)
10
{
11
double
tmp
=
y
;
12
y
=
x
;
13
x
=
tmp
;
14
res
[
i
] =
i
;
15
}
16
res
[
N
] =
y
*
y
;
17
res
[
N
+
1
] =
x
;
18
}
19
20
int
21
main
(
void
)
22
{
23
double
res
[
N
+
2
];
24
f
(
10
,
20
,
res
);
25
for
(
int
i
=
0
;
i
<
N
; ++
i
)
26
if
(
res
[
i
] !=
i
)
27
__builtin_abort
();
28
if
(
res
[
N
] !=
100
||
res
[
N
+
1
] != -
20
)
29
__builtin_abort
();
30
return
0
;
31
}