1 /* { dg-do compile } */
2 /* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
13 /* Reduction of signed-int. */
15 __attribute__ ((noinline
))
16 void main1 (int x
, int max_result
, int min_result
)
23 for (i
= 0; i
< N
; i
++) {
24 diff
+= (b
[i
] - c
[i
]);
27 for (i
= 0; i
< N
; i
++) {
28 max
= max
< c
[i
] ? c
[i
] : max
;
31 for (i
= 0; i
< N
; i
++) {
32 min
= min
> c
[i
] ? c
[i
] : min
;
38 if (max
!= max_result
)
40 if (min
!= min_result
)
44 __attribute__((noinline
))
61 main1 (2000, 2000, 1);
66 /* { dg-final { scan-tree-dump-times "Detected reduction" 3 "parloops" { xfail *-*-* } } } */
67 /* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 4 "parloops" { xfail *-*-* } } } */