re PR fortran/64925 (ICE with same names for dummy arg and internal procedure)
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/64925 * symbol.c(check_conflict): Check for a conflict between a dummy argument and an internal procedure name. 2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/64925 * gfortran.dg/pr64925.f90: New test. From-SVN: r223313
This commit is contained in:
parent
87734648c9
commit
f7c1c17192
|
@ -1,3 +1,9 @@
|
|||
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/64925
|
||||
* symbol.c(check_conflict): Check for a conflict between a dummy
|
||||
argument and an internal procedure name.
|
||||
|
||||
2015-05-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
|
||||
|
||||
PR fortran/65903
|
||||
|
|
|
@ -458,6 +458,11 @@ check_conflict (symbol_attribute *attr, const char *name, locus *where)
|
|||
}
|
||||
}
|
||||
|
||||
if (attr->dummy && ((attr->function || attr->subroutine) &&
|
||||
gfc_current_state () == COMP_CONTAINS))
|
||||
gfc_error_now ("internal procedure '%s' at %L conflicts with "
|
||||
"DUMMY argument", name, where);
|
||||
|
||||
conf (dummy, entry);
|
||||
conf (dummy, intrinsic);
|
||||
conf (dummy, threadprivate);
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
PR fortran/64925
|
||||
* gfortran.dg/pr64925.f90: New test.
|
||||
|
||||
2015-05-18 Steven G. Kargl <kargl@gcc.gnu.org>
|
||||
|
||||
* gfortran.dg/lto/pr41521_0.f90: Move INTERFACE statement in program
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
! { dg-do compile }
|
||||
! PR fortran/64925
|
||||
! Original test case provided by Bill Long <longb at cray dot com>
|
||||
!
|
||||
subroutine foo(nnn, aaa, bbb, ccc, ddd)
|
||||
implicit none
|
||||
integer :: nnn, aaa, bbb(nnn)
|
||||
integer :: i
|
||||
do i=1,nnn
|
||||
aaa = aaa + bbb(ccc(i))
|
||||
end do
|
||||
call ddd(aaa)
|
||||
contains
|
||||
integer function ccc(i) ! { dg-error "conflicts with DUMMY" }
|
||||
integer :: i
|
||||
ccc = i
|
||||
end function ccc
|
||||
subroutine ddd(j) ! { dg-error "conflicts with DUMMY" }
|
||||
integer j
|
||||
j = j + 1
|
||||
end subroutine ddd
|
||||
end subroutine foo
|
Loading…
Reference in New Issue