diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/team_change_1.f90 | 18 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/team_end_1.f90 | 18 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/team_form_1.f90 | 12 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/team_number_1.f90 | 22 |
5 files changed, 81 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 317be5e..730b148 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,14 @@ +2018-01-26 Damian Rouson <damian@sourceryinstitute.org> + Alessandro Fanfarillo <fanfarillo.gcc@gmail.com> + Soren Rasmussen <s.c.rasmussen@gmail.com> + + Fortran 2018 teams tests. + + * gfortran.dg/team_number_1.f90: new test for team_number. + * gfortran.dg/team_change_1.f90: new test for change team. + * gfortran.dg/team_end_1.f90: new test for end team. + * gfortran.dg/team_form_1.f90: new test for form team. + 2018-01-26 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/83998 diff --git a/gcc/testsuite/gfortran.dg/team_change_1.f90 b/gcc/testsuite/gfortran.dg/team_change_1.f90 new file mode 100644 index 0000000..1dd4208 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/team_change_1.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Tests if change team worked +! + use iso_fortran_env, only : team_type + implicit none + type(team_type) team + integer new_team + + new_team = mod(this_image(),2)+1 + + form team (new_team,team) + change team (team) + if (team_number()/=new_team) call abort + end team + +end diff --git a/gcc/testsuite/gfortran.dg/team_end_1.f90 b/gcc/testsuite/gfortran.dg/team_end_1.f90 new file mode 100644 index 0000000..5a05b7f --- /dev/null +++ b/gcc/testsuite/gfortran.dg/team_end_1.f90 @@ -0,0 +1,18 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Tests if team_number intrinsic fucntion works +! + use iso_fortran_env, only : team_type + implicit none + type(team_type) :: team + integer, parameter :: standard_initial_value=-1 + + associate(new_team => mod(this_image(),2)+1) + form team (new_team,team) + change team (team) + end team + end associate + + if (team_number()/=standard_initial_value) call abort +end diff --git a/gcc/testsuite/gfortran.dg/team_form_1.f90 b/gcc/testsuite/gfortran.dg/team_form_1.f90 new file mode 100644 index 0000000..fd492f6 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/team_form_1.f90 @@ -0,0 +1,12 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Tests if form team works +! + use iso_fortran_env, only : team_type + implicit none + type(team_type) :: team + + form team (mod(this_image(),2)+1,team) + +end diff --git a/gcc/testsuite/gfortran.dg/team_number_1.f90 b/gcc/testsuite/gfortran.dg/team_number_1.f90 new file mode 100644 index 0000000..242ea50 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/team_number_1.f90 @@ -0,0 +1,22 @@ +! { dg-do run } +! { dg-options "-fcoarray=single" } +! +! Tests if team_number intrinsic fucntion works +! + use iso_fortran_env, only : team_type + implicit none + type(team_type) team + integer, parameter :: standard_initial_value=-1 + integer new_team + + if (team_number()/=standard_initial_value) call abort + + new_team = mod(this_image(),2)+1 + form team (new_team,team) + change team (team) + if (team_number()/=new_team) call abort + end team + + if (team_number()/=standard_initial_value) call abort + +end |