Skip to content

Commit 9c4176a

Browse files
author
Damian Rouson
committed
Fix "team change" statement unit test
1 parent 38f2998 commit 9c4176a

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

gcc/testsuite/gfortran.dg/team_change_1.f90

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@
66
use iso_fortran_env, only : team_type
77
implicit none
88
type(team_type) :: team
9-
integer :: orig_i
9+
integer :: new_team
10+
integer, parameter :: standard_initial_value=-1
1011

11-
orig_i = this_image ()
12-
form team (orig_i + 1,team)
13-
change team (team)
14-
if ( orig_i + 1 .NE. this_image() ) call abort
12+
if (team_number()/=standard_initial_value) call abort
13+
14+
new_team = mod(this_image(),2)+1
15+
16+
form team (new_team,team)
17+
change team (team)
18+
if (team_number()/=new_team) call abort
19+
end team
20+
21+
if (team_number()/=standard_initial_value) call abort
1522
end

0 commit comments

Comments
 (0)