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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@168554
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
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
-! { dg-do "compile" }
+! { dg-do compile }
!
! PR fortran/33117, PR fortran/46478
! Procedures of a generic interface must be either
!
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
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