From cc0ca512037ada71ad22dc1da54fa9fd79b11fca Mon Sep 17 00:00:00 2001 From: Jerry DeLisle Date: Wed, 4 Jul 2007 01:13:47 +0000 Subject: [PATCH] re PR fortran/32545 (Give an (compile time) error not a warning for wrong edit format statements) 2007-07-03 Jerry DeLisle PR fortran/32545 * gfortran.dg/fmt_error.f90: New test. 2007-07-03 Jerry DeLisle PR fortran/32612 * gfortran.dg/interface_13.f90: New test. From-SVN: r126296 --- gcc/testsuite/ChangeLog | 12 ++++++++- gcc/testsuite/gfortran.dg/fmt_error.f90 | 4 +++ gcc/testsuite/gfortran.dg/interface_13.f90 | 31 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gfortran.dg/fmt_error.f90 create mode 100644 gcc/testsuite/gfortran.dg/interface_13.f90 diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 97d5e2bf4e8..77dc469169e 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,14 @@ -2007-06-29 Dave Brolley +2007-07-03 Jerry DeLisle + + PR fortran/32545 + * gfortran.dg/fmt_error.f90: New test. + +2007-07-03 Jerry DeLisle + + PR fortran/32612 + * gfortran.dg/interface_13.f90: New test. + +2007-07-03 Dave Brolley PR c++/31743 * g++.dg/init/new20.C: New test. diff --git a/gcc/testsuite/gfortran.dg/fmt_error.f90 b/gcc/testsuite/gfortran.dg/fmt_error.f90 new file mode 100644 index 00000000000..45d58553539 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/fmt_error.f90 @@ -0,0 +1,4 @@ +! { dg-do compile } +! PR32545 Give compile error not warning for wrong edit format statements. +read (5,'(i0)') i ! { dg-error "Error: Positive width required in format" } +end diff --git a/gcc/testsuite/gfortran.dg/interface_13.f90 b/gcc/testsuite/gfortran.dg/interface_13.f90 new file mode 100644 index 00000000000..7394de19329 --- /dev/null +++ b/gcc/testsuite/gfortran.dg/interface_13.f90 @@ -0,0 +1,31 @@ +! { dg-do compile } +! PR32612 gfortran - incorrectly flags error on interface module +! Test case is that of the reporters + module files_module + implicit none + integer, parameter :: REAL8 = SELECTED_REAL_KIND(12) + save + private + interface my_sio_file_read_common + module procedure my_sio_file_read_common ! This was rejected before + end interface + contains + subroutine my_sio_file_read_all_i4(serial, data, data_lengths, error) + logical, intent(in) :: serial + integer, intent(out) :: data(*) + integer, intent(in) :: data_lengths(0:*) + integer, intent(out) :: error + call my_sio_file_read_common(data_lengths, error, data_i4 = data) + end subroutine my_sio_file_read_all_i4 + subroutine my_sio_file_read_common(data_lengths, error, & + data_i4, & + data_r8) + integer, intent(in) :: data_lengths(0:*) + integer, intent(out) :: error + integer, intent(out), optional :: data_i4(*) + real(REAL8), intent(out), optional :: data_r8(*) + error=0 + data_i4(1)=0 + data_r8(1)=0 + end subroutine my_sio_file_read_common + end module files_module \ No newline at end of file -- 2.30.2