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
fortran: Factor the evaluation of MINLOC/MAXLOC's BACK argument
[official-gcc.git]
/
libgomp
/
testsuite
/
libgomp.c
/
udr-3.c
blob
e0a5b8764df3c8fdd7750b60e00949ca48c9fce3
1
/* { dg-do run } */
2
3
extern
void
abort
();
4
5
struct
S
;
6
void
foo
(
struct
S
*,
struct
S
*);
7
#pragma omp declare reduction (+:struct S:foo (&omp_out, &omp_in))
8
struct
S
{
int
s
; };
9
10
void
11
foo
(
struct
S
*
x
,
struct
S
*
y
)
12
{
13
x
->
s
+=
y
->
s
;
14
}
15
16
int
17
main
()
18
{
19
struct
S s
;
20
int
i
=
0
;
21
s
.
s
=
0
;
22
#pragma omp parallel reduction (+:s, i)
23
{
24
if
(
s
.
s
!=
0
)
25
abort
();
26
s
.
s
=
2
;
27
i
=
1
;
28
}
29
if
(
s
.
s
!=
2
*
i
)
30
abort
();
31
return
0
;
32
}