re PR fortran/60148 (strings in NAMELIST do not honor DELIM= in open statement)
2014-03-03 Jerry DeLisle <jvdelisle@gcc.gnu> PR libfortran/60148 * gfortran.dg/namelist_84.f90: New test. From-SVN: r208303
This commit is contained in:
parent
75b2dba9ae
commit
03aac9ce62
@ -1,3 +1,8 @@
|
||||
2014-03-03 Jerry DeLisle <jvdelisle@gcc.gnu>
|
||||
|
||||
PR libfortran/60148
|
||||
* gfortran.dg/namelist_84.f90: New test.
|
||||
|
||||
2014-03-03 Kirill Yukhin <kirill.yukhin@intel.com>
|
||||
|
||||
* gcc.target/i386/avx512er-vexp2ps-2.c: Decrease exponent
|
||||
|
28
gcc/testsuite/gfortran.dg/namelist_84.f90
Normal file
28
gcc/testsuite/gfortran.dg/namelist_84.f90
Normal file
@ -0,0 +1,28 @@
|
||||
! { dg-do run }
|
||||
program namelist_delim_none
|
||||
implicit none
|
||||
character(512) :: internal_unit
|
||||
character(5), dimension(5) :: mystring
|
||||
real, dimension(4) :: somenum
|
||||
integer :: i
|
||||
namelist /mylist/ mystring, somenum
|
||||
mystring(1)='mon'
|
||||
mystring(2)='tue'
|
||||
mystring(3)='wed'
|
||||
mystring(4)='thu'
|
||||
mystring(5)='fri'
|
||||
somenum = reshape(source = (/ 2, 3, 5, 7 /), shape=shape(somenum))
|
||||
|
||||
open(unit=10,status='scratch',delim='none')
|
||||
write(10, mylist)
|
||||
rewind(10)
|
||||
mystring = "xxxxx"
|
||||
read(10,mylist)
|
||||
if (any(mystring /= (/ 'mon', 'tue', 'wed', 'thu', 'fri' /))) call abort
|
||||
rewind(10)
|
||||
do i=1,5
|
||||
read(10,'(a)') internal_unit
|
||||
if (scan(internal_unit,"""'").ne.0) call abort
|
||||
end do
|
||||
close(10)
|
||||
end program
|
Loading…
Reference in New Issue
Block a user