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