re PR fortran/27634 (formatted reading/writing: real format without dot)

2006-05-29  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

	PR libgfortran/27634
	* gfortran.dg/fmt_missing_period_1.f: New test.
	* gfortran.dg/fmt_missing_period_2.f: New test.
	* gfortran.dg/fmt_missing_period_3.f: New test.

From-SVN: r114214
This commit is contained in:
Jerry DeLisle 2006-05-29 19:39:15 +00:00
parent c9f4aa9767
commit acb69f1c02
4 changed files with 48 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2006-05-29 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/27634
* gfortran.dg/fmt_missing_period_1.f: New test.
* gfortran.dg/fmt_missing_period_2.f: New test.
* gfortran.dg/fmt_missing_period_3.f: New test.
2006-05-29 Francois-Xavier Coudert <coudert@clipper.ens.fr>
PR fortran/19777

View File

@ -0,0 +1,10 @@
! { dg-compile }
! PR27634 Missing period in format specifier. Test case derived from case given
! in PR. Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
real aval
character(6) :: str
character(12) :: input = "1234abcdef"
read(input,'(f4,a6)') aval, str !{ dg-error "Period required" }
read(input,'(d10,a6)') aval, str !{ dg-error "Period required" }
end

View File

@ -0,0 +1,16 @@
! { dg-run }
! { dg-options "-w -std=legacy" }
! PR27634 Missing period in format specifier. Test case derived from case given
! in PR. Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
real :: aval = 3.14
character(6) :: str = "xyz"
character(12) :: input = "1234abcdef"
read(input,'(f4,a6)') aval, str
if (aval.ne.1234.0) call abort()
if (str.ne."abcdef") call abort()
aval = 0.0
str = "xyz"
read(input,'(d4,a6)') aval, str
if (aval.ne.1234.0) call abort()
if (str.ne."abcdef") call abort()
end

View File

@ -0,0 +1,15 @@
! { dg-run }
! { dg-options "-std=legacy" }
! PR27634 Missing period in format specifier. Test case derived from case given
! in PR. Submitted by Jerry DeLisle <jvdelisle@gcc.gnu.org>
real :: aval = 3.14
character(6) :: str = "xyz"
character(12) :: input = "1234abcdef"
character(8) :: fmtstr = "(f4,a6)"
aval = 0.0
str = "xyz"
read(input,fmtstr) aval, str
if (aval.ne.1234.0) call abort()
if (str.ne."abcdef") call abort()
end