aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDaniel Franke <franke.daniel@gmail.com>2011-01-06 16:42:53 -0500
committerDaniel Franke <dfranke@gcc.gnu.org>2011-01-06 16:42:53 -0500
commit3728af14053ba27bca45fb76083513d10dbf181d (patch)
tree9bf7708a4c185a39ba14dcf2557f5aae7ae19b9b /gcc
parente1a973d838b24e8a78ea0b6b4336d7c961e42b7a (diff)
downloadgcc-3728af14053ba27bca45fb76083513d10dbf181d.zip
gcc-3728af14053ba27bca45fb76083513d10dbf181d.tar.gz
gcc-3728af14053ba27bca45fb76083513d10dbf181d.tar.bz2
re PR fortran/47195 (New Fortran test failures)
2011-01-06 Daniel Franke <franke.daniel@gmail.com> PR fortran/47195 * gfortran.dg/interface_33.f90: Fixed dg-error declarations. * gfortran.dg/defined_operators_1.f90: Split the subroutine from the interface of functions to not hide the errors that shall be tested. From-SVN: r168554
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog8
-rw-r--r--gcc/testsuite/gfortran.dg/defined_operators_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/interface_33.f906
3 files changed, 22 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 739b65e..0a1c3d0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,11 @@
+2011-01-06 Daniel Franke <franke.daniel@gmail.com>
+
+ PR fortran/47195
+ * gfortran.dg/interface_33.f90: Fixed dg-error declarations.
+ * gfortran.dg/defined_operators_1.f90: Split the subroutine
+ from the interface of functions to not hide the errors that
+ shall be tested.
+
2011-01-06 Jan Hubicka <jh@suse.cz>
* testsuite/gcc.dg/lto/pr47188_0.c: New testcase.
diff --git a/gcc/testsuite/gfortran.dg/defined_operators_1.f90 b/gcc/testsuite/gfortran.dg/defined_operators_1.f90
index bd25021..c7868d1 100644
--- a/gcc/testsuite/gfortran.dg/defined_operators_1.f90
+++ b/gcc/testsuite/gfortran.dg/defined_operators_1.f90
@@ -17,10 +17,21 @@ module mymod
character(*) :: foo_chr
character(*), intent(in) :: chr
end function foo_chr
+ end interface
+
+ !
+ ! PR fortran/33117
+ ! PR fortran/46478
+ ! Mixing FUNCTIONs and SUBROUTINEs in an INTERFACE hides the
+ ! errors that should be tested here. Hence split out subroutine
+ ! to test separately.
+ !
+ interface operator (.bar.)
subroutine bad_foo (chr) ! { dg-error "must be a FUNCTION" }
character(*), intent(in) :: chr
end subroutine bad_foo
end interface
+
contains
function foo_0 () ! { dg-error "must have at least one argument" }
integer :: foo_1
diff --git a/gcc/testsuite/gfortran.dg/interface_33.f90 b/gcc/testsuite/gfortran.dg/interface_33.f90
index f1475b0..955d507 100644
--- a/gcc/testsuite/gfortran.dg/interface_33.f90
+++ b/gcc/testsuite/gfortran.dg/interface_33.f90
@@ -1,4 +1,4 @@
-! { dg-do "compile" }
+! { dg-do compile }
!
! PR fortran/33117, PR fortran/46478
! Procedures of a generic interface must be either
@@ -10,7 +10,7 @@
!
module m1
interface gen
- subroutine sub() ! dg-error { "all SUBROUTINEs or all FUNCTIONs" }
+ subroutine sub() ! { dg-error "all SUBROUTINEs or all FUNCTIONs" }
end subroutine sub
function bar()
real :: bar
@@ -27,7 +27,7 @@ MODULE m2
MODULE PROCEDURE subr_name
END INTERFACE
CONTAINS
- LOGICAL FUNCTION func_name() ! dg-error { "all SUBROUTINEs or all FUNCTIONs" }
+ LOGICAL FUNCTION func_name() ! { dg-error "all SUBROUTINEs or all FUNCTIONs" }
END FUNCTION
SUBROUTINE subr_name()
END SUBROUTINE