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
/
pr58417.c
blob
5cb0ddb027577b61d21cb7e881bd95f351bef47d
1
/* { dg-do run } */
2
3
long long
arr
[
6
] = {
0
,
1
,
2
,
3
,
4
,
5
};
4
extern
void
abort
(
void
);
5
void
__attribute__
((
noinline
,
noclone
))
6
foo
(
long long
sum
)
7
{
8
asm
(
""
);
9
}
10
int
main
()
11
{
12
int
i
,
n
=
5
;
13
long long
sum
=
0
,
prevsum
=
0
;
14
15
for
(
i
=
1
;
i
<=
n
;
i
++)
16
{
17
foo
(
sum
);
18
sum
= (
i
-
1
) *
arr
[
i
] -
prevsum
;
19
prevsum
+=
arr
[
i
];
20
}
21
22
if
(
sum
!=
10
)
23
abort
();
24
return
0
;
25
}