mirror of git://gcc.gnu.org/git/gcc.git
re PR fortran/40453 ([F95] Enhanced (recursive) argument checking)
2012-10-12 Janus Weil <janus@gcc.gnu.org> PR fortran/40453 * interface.c (check_dummy_characteristics): Recursively check dummy procedures. 2012-10-12 Janus Weil <janus@gcc.gnu.org> PR fortran/40453 * gfortran.dg/dummy_procedure_9.f90: New. From-SVN: r192391
This commit is contained in:
parent
60b95d28c0
commit
f2f8171fb1
|
|
@ -1,3 +1,9 @@
|
||||||
|
2012-10-12 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/40453
|
||||||
|
* interface.c (check_dummy_characteristics): Recursively check dummy
|
||||||
|
procedures.
|
||||||
|
|
||||||
2012-10-11 Janus Weil <janus@gcc.gnu.org>
|
2012-10-11 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
PR fortran/54784
|
PR fortran/54784
|
||||||
|
|
|
||||||
|
|
@ -1063,6 +1063,19 @@ check_dummy_characteristics (gfc_symbol *s1, gfc_symbol *s2,
|
||||||
/* FIXME: Do more comprehensive testing of attributes, like e.g.
|
/* FIXME: Do more comprehensive testing of attributes, like e.g.
|
||||||
ASYNCHRONOUS, CONTIGUOUS, VALUE, VOLATILE, etc. */
|
ASYNCHRONOUS, CONTIGUOUS, VALUE, VOLATILE, etc. */
|
||||||
|
|
||||||
|
/* Check interface of dummy procedures. */
|
||||||
|
if (s1->attr.flavor == FL_PROCEDURE)
|
||||||
|
{
|
||||||
|
char err[200];
|
||||||
|
if (!gfc_compare_interfaces (s1, s2, s2->name, 0, 1, err, sizeof(err),
|
||||||
|
NULL, NULL))
|
||||||
|
{
|
||||||
|
snprintf (errmsg, err_len, "Interface mismatch in dummy procedure "
|
||||||
|
"'%s': %s", s1->name, err);
|
||||||
|
return FAILURE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Check string length. */
|
/* Check string length. */
|
||||||
if (s1->ts.type == BT_CHARACTER
|
if (s1->ts.type == BT_CHARACTER
|
||||||
&& s1->ts.u.cl && s1->ts.u.cl->length
|
&& s1->ts.u.cl && s1->ts.u.cl->length
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,8 @@
|
||||||
|
2012-10-12 Janus Weil <janus@gcc.gnu.org>
|
||||||
|
|
||||||
|
PR fortran/40453
|
||||||
|
* gfortran.dg/dummy_procedure_9.f90: New.
|
||||||
|
|
||||||
2012-10-12 Richard Biener <rguenther@suse.de>
|
2012-10-12 Richard Biener <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/54894
|
PR tree-optimization/54894
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
! { dg-do compile }
|
||||||
|
!
|
||||||
|
! PR 40453: [F95] Enhanced (recursive) argument checking
|
||||||
|
!
|
||||||
|
! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
|
||||||
|
|
||||||
|
program RecursiveInterface
|
||||||
|
|
||||||
|
call c(b2) ! { dg-error "Interface mismatch in dummy procedure" }
|
||||||
|
|
||||||
|
contains
|
||||||
|
|
||||||
|
subroutine a1(x)
|
||||||
|
real :: x
|
||||||
|
end subroutine
|
||||||
|
|
||||||
|
subroutine a2(i)
|
||||||
|
integer :: i
|
||||||
|
end subroutine
|
||||||
|
|
||||||
|
!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
subroutine b1 (f1)
|
||||||
|
procedure(a1) :: f1
|
||||||
|
end subroutine
|
||||||
|
|
||||||
|
subroutine b2 (f2)
|
||||||
|
procedure(a2) :: f2
|
||||||
|
end subroutine
|
||||||
|
|
||||||
|
!!!!!!!!!!!!!!!
|
||||||
|
|
||||||
|
subroutine c(g)
|
||||||
|
procedure(b1) :: g
|
||||||
|
end subroutine
|
||||||
|
|
||||||
|
end
|
||||||
Loading…
Reference in New Issue