OSDN Git Service

2007-07-03 Jerry DeLisle <jvdelisle@gcc.gnu.org>
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Jul 2007 01:13:47 +0000 (01:13 +0000)
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 4 Jul 2007 01:13:47 +0000 (01:13 +0000)
PR fortran/32545
* gfortran.dg/fmt_error.f90: New test.

2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>

PR fortran/32612
* gfortran.dg/interface_13.f90: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126296 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/fmt_error.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/interface_13.f90 [new file with mode: 0644]

index 97d5e2b..77dc469 100644 (file)
@@ -1,4 +1,14 @@
-2007-06-29  Dave Brolley  <brolley@redhat.com>
+2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/32545
+       * gfortran.dg/fmt_error.f90: New test.
+
+2007-07-03  Jerry DeLisle  <jvdelisle@gcc.gnu.org>
+
+       PR fortran/32612
+       * gfortran.dg/interface_13.f90: New test.
+
+2007-07-03  Dave Brolley  <brolley@redhat.com>
 
        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 (file)
index 0000000..45d5855
--- /dev/null
@@ -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 (file)
index 0000000..7394de1
--- /dev/null
@@ -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