From: Jerry DeLisle Date: Thu, 28 Dec 2006 01:41:57 +0000 (+0000) Subject: re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4) X-Git-Tag: releases/gcc-4.3.0~7816 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5fe1967fed91ec271e1cfceee502699a79227302;p=thirdparty%2Fgcc.git re PR libfortran/30014 (INQUIRE (iolength = xx) limited to kind=4) 2006-12-27 Jerry DeLisle PR fortran/30014 * gfortran.dg/io_constraints_1.f90: Update test. * gfortran.dg/io_constraints_2.f90: Update test. * gfortran.dg/inquire_iolength.f90: Ne test. From-SVN: r120235 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9d0be233c1fb..fd4da6d307f3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2006-12-27 Jerry DeLisle + + PR fortran/30014 + * gfortran.dg/io_constraints_1.f90: Update test. + * gfortran.dg/io_constraints_2.f90: Update test. + * gfortran.dg/inquire_iolength.f90: Ne test. + 2006-12-27 Paul Thomas PR fortran/20896 diff --git a/gcc/testsuite/gfortran.dg/inquire_iolength.f90 b/gcc/testsuite/gfortran.dg/inquire_iolength.f90 new file mode 100644 index 000000000000..362746bae94e --- /dev/null +++ b/gcc/testsuite/gfortran.dg/inquire_iolength.f90 @@ -0,0 +1,10 @@ +! { dg-do compile} +! { dg-options "-std=f95" } +! PR30014 IOLENGTH does not handle KIND=8. This patch checks the constraints. +! Submitted by Jerry DeLisle +! F95 Standard 9.6, R923 +integer (kind=4) small, x +integer (kind=8) large +inquire (iolength=small) x +inquire (iolength=large) x ! { dg-error "requires default INTEGER" } +end diff --git a/gcc/testsuite/gfortran.dg/io_constraints_1.f90 b/gcc/testsuite/gfortran.dg/io_constraints_1.f90 index 5284f2ab1454..00306a0a7b40 100644 --- a/gcc/testsuite/gfortran.dg/io_constraints_1.f90 +++ b/gcc/testsuite/gfortran.dg/io_constraints_1.f90 @@ -54,7 +54,6 @@ end module global ! R912 !Was correctly picked up before patch. write(6, NML=NL, iostat = ierr) ! { dg-warning "requires default INTEGER" } - READ(1, fmt='(i6)', advance='NO', size = ierr) ! { dg-warning "requires default INTEGER" } ! Constraints !Was correctly picked up before patch. diff --git a/gcc/testsuite/gfortran.dg/io_constraints_2.f90 b/gcc/testsuite/gfortran.dg/io_constraints_2.f90 index 73c4979f2a9c..9e83561773e2 100644 --- a/gcc/testsuite/gfortran.dg/io_constraints_2.f90 +++ b/gcc/testsuite/gfortran.dg/io_constraints_2.f90 @@ -53,6 +53,8 @@ end module global ! Not allowed with an ADVANCE=specifier READ(buffer, fmt='(i6)', advance='YES') a ! { dg-error "internal file" } READ(1, NML=NL, advance='YES') ! { dg-error "NAMELIST IO is not allowed" } + + READ(1, fmt='(i6)', advance='NO', size = ierr) ! { dg-error "requires default INTEGER" } READ(1, advance='YES') ! { dg-error "must appear with an explicit format" }