diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gfortran.dg/namelist_95.f90 | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0a8ed92..792d1b9 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2017-12-03 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/831916 + * gfortran.dg/namelist_95.f90: New test. + 2017-12-01 Jan Hubicka <hubicka@ucw.cz> PR target/81616 diff --git a/gcc/testsuite/gfortran.dg/namelist_95.f90 b/gcc/testsuite/gfortran.dg/namelist_95.f90 new file mode 100644 index 0000000..5956648 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/namelist_95.f90 @@ -0,0 +1,23 @@ +! { dg-do run } +! PR83191 Writing a namelist with repeated complex + +program test + +implicit none + +integer, parameter :: UNIT = 1 +character(len=8), parameter :: FILE = "namelist" + +complex, dimension(3) :: a = (/ (0.0, 0.0), (0.0, 0.0), (3.0, 4.0) /) + +namelist /complex_namelist/ a + +open(UNIT, file=FILE) +write(UNIT, nml=complex_namelist) +close(UNIT) + +open(UNIT, file=FILE) +read(UNIT, nml=complex_namelist) +close(UNIT, status="delete") +if (any(a.ne.(/ (0.0, 0.0), (0.0, 0.0), (3.0, 4.0) /))) call abort +end program test |