This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Patch, Fortran, OOP] PR 78800: ICE in compare_parameter, at fortran/interface.c:2246


Hi all,

the attached patch deals with error recovery only and fixes an
ICE-on-invalid problem.

Regtests cleanly on x86_64-linux-gnu. Ok for trunk?

Cheers,
Janus


2016-12-15  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/78800
    * interface.c (compare_allocatable): Avoid additional errors on bad
    class declarations.
    (compare_parameter): Put the result of gfc_expr_attr into a variable,
    in order to avoid calling it multiple times. Exit early on bad class
    declarations to avoid ICE.

2016-12-15  Janus Weil  <janus@gcc.gnu.org>

    PR fortran/78800
    * gfortran.dg/unlimited_polymorphic_27.f90: New test case.

Attachment: pr78800_v2.diff
Description: Text document

! { dg-do compile }
!
! PR 78800: [OOP] ICE in compare_parameter, at fortran/interface.c:2246
!
! Contributed by Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de>

program p
   type t
   end type
   class(*) :: z  ! { dg-error "must be dummy, allocatable or pointer" }
   call s(z)
contains
   subroutine s(x)
      type(t) :: x
   end
end

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]