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
PR libfortran/64770 Segfault when trying to open existing file with status="new".
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
graphite
/
run-id-2.c
blob
4a2361667abad6d4b1c1339bb275d6171e38807d
1
int
a
[
1
] = {
1
};
2
3
static int
__attribute__
((
noinline
))
4
foo
(
int
n
)
5
{
6
int
i
,
c
=
0
;
7
for
(
i
=
0
;
i
<
n
;
i
++)
8
c
+=
a
[
i
];
9
return
c
;
10
}
11
12
int
b
[
2
] = {
2
,
3
};
13
14
static int
__attribute__
((
noinline
))
bar
(
int
n
)
15
{
16
int
i
,
c
=
0
;
17
for
(
i
=
0
;
i
<
n
;
i
++)
18
c
+=
b
[
i
];
19
return
c
;
20
}
21
22
extern
void
abort
();
23
24
int
main
()
25
{
26
if
(
foo
(
0
) !=
0
27
||
foo
(
1
) !=
1
28
||
bar
(
0
) !=
0
29
||
bar
(
1
) !=
2
30
||
bar
(
2
) !=
5
)
31
abort
();
32
33
return
0
;
34
}
35