Skip to content

Commit

Permalink
2017-11-11 Janus Weil <janus@gcc.gnu.org>
Browse files Browse the repository at this point in the history
	PR fortran/82932
	* resolve.c (update_compcall_arglist): Improve error recovery,
	remove a gcc_assert.

2017-11-11  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/82932
	* gfortran.dg/typebound_call_29.f90: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254660 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
janus committed Nov 11, 2017
1 parent d16ea7e commit 179137d
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
6 changes: 6 additions & 0 deletions gcc/fortran/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2017-11-11 Janus Weil <janus@gcc.gnu.org>

PR fortran/82932
* resolve.c (update_compcall_arglist): Improve error recovery,
remove a gcc_assert.

2017-11-10 Fritz Reese <fritzoreese@gmail.com>

PR fortran/82886
Expand Down
4 changes: 3 additions & 1 deletion gcc/fortran/resolve.c
Original file line number Diff line number Diff line change
Expand Up @@ -5834,7 +5834,9 @@ update_compcall_arglist (gfc_expr* e)
return true;
}

gcc_assert (tbp->pass_arg_num > 0);
if (tbp->pass_arg_num <= 0)
return false;

e->value.compcall.actual = update_arglist_pass (e->value.compcall.actual, po,
tbp->pass_arg_num,
tbp->pass_arg);
Expand Down
5 changes: 5 additions & 0 deletions gcc/testsuite/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2017-11-11 Janus Weil <janus@gcc.gnu.org>

PR fortran/82932
* gfortran.dg/typebound_call_29.f90: New test.

2017-11-10 Fritz Reese <fritzoreese@gmail.com>

PR fortran/82886
Expand Down
46 changes: 46 additions & 0 deletions gcc/testsuite/gfortran.dg/typebound_call_29.f90
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
! { dg-do compile }
!
! PR 82932: [OOP] ICE in update_compcall_arglist, at fortran/resolve.c:5837
!
! Contributed by Janus Weil <janus@gcc.gnu.org>

module m

implicit none

type, abstract :: AT
contains
procedure(init_ifc), deferred :: sinit
procedure(missing_ifc), deferred :: missing
generic :: init => sinit
end type

abstract interface
subroutine init_ifc(data)
import AT
class(AT) :: data
end subroutine
subroutine missing_ifc(data)
import AT
class(AT) :: data
end subroutine
end interface

end module


program p

use m

implicit none

type, extends(AT) :: ET ! { dg-error "must be ABSTRACT" }
contains
procedure :: sinit
end type

type(ET) :: c
call c%init()

end

0 comments on commit 179137d

Please sign in to comment.