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 target/82855
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
parloops-exit-first-loop-alt-4.c
blob
ac420fa3662335d1cfa80061c91dbc0c542bab62
1
/* { dg-do run } */
2
/* { dg-additional-options "-ftree-parallelize-loops=2" } */
3
4
/* Constant bound, reduction. */
5
6
#include <stdlib.h>
7
8
#define N 4000
9
10
unsigned int
*
a
;
11
12
unsigned int
13
f
(
void
)
14
{
15
int
i
;
16
unsigned int
sum
=
1
;
17
18
for
(
i
=
0
;
i
<
N
; ++
i
)
19
sum
+=
a
[
i
];
20
21
return
sum
;
22
}
23
24
int
25
main
(
void
)
26
{
27
unsigned int
res
;
28
unsigned int
array
[
N
];
29
int
i
;
30
for
(
i
=
0
;
i
<
N
; ++
i
)
31
array
[
i
] =
i
%
7
;
32
a
= &
array
[
0
];
33
res
=
f
();
34
if
(
res
!=
11995
)
35
abort
();
36
return
0
;
37
}