Commit 9a1425da by Jerry DeLisle

re PR fortran/40853 (I/O: Namelist read error)

2009-08-02  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libfortran/40853
	* gfortran.dg/namelist_40.f90: Update error output.
	* gfortran.dg/namelist_47.f90: Update error output.
	* gfortran.dg/namelist_58.f90: New test.

From-SVN: r150357
parent ba286d56
2009-08-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libfortran/40853
* gfortran.dg/namelist_40.f90: Update error output.
* gfortran.dg/namelist_47.f90: Update error output.
* gfortran.dg/namelist_58.f90: New test.
2009-08-02 Janus Weil <janus@gcc.gnu.org>
PR fortran/40881
......
......@@ -47,7 +47,7 @@ subroutine writenml (astring)
end subroutine writenml
end program namelist_40
! { dg-output "Multiple sub-objects with non-zero rank in namelist object x(\n|\r\n|\r)" }
! { dg-output "Multiple sub-objects with non-zero rank in namelist object x%m%ch(\n|\r\n|\r)" }
! { dg-output "Missing colon in substring qualifier for namelist variable x%m%ch(\n|\r\n|\r)" }
! { dg-output "Substring out of range for namelist variable x%m%ch(\n|\r\n|\r)" }
! { dg-output "Bad character in substring qualifier for namelist variable x%m%ch(\n|\r\n|\r)" }
......
......@@ -45,7 +45,7 @@ subroutine writenml (astring)
end subroutine writenml
end program namelist_47
! { dg-output "Multiple sub-objects with non-zero rank in namelist object x(\n|\r\n|\r)" }
! { dg-output "Multiple sub-objects with non-zero rank in namelist object x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
! { dg-output "Missing colon in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
! { dg-output "Substring out of range for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
! { dg-output "Bad character in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
......
! { dg-do run }
! PR40853 Error in namelist IO.
! Test case derived from example given in PR. < jvdelisle@gcc.gnu.org >
program test
implicit none
type tao_title_struct
character(2) justify
end type
type tao_plot_page_struct
real shape_height_max
type (tao_title_struct) title ! Comment this line out and the bug goes away.
real size(2)
end type
type (tao_plot_page_struct) plot_page
namelist / params / plot_page
open (10, status="scratch")
write(10,'(a)')" &params"
write(10,'(a)')" plot_page%size=5 , 2,"
write(10,'(a)')"/"
rewind(10)
read (10, nml = params)
if (any(plot_page%size .ne. (/ 5, 2 /))) call abort
close (10)
end program
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment