This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/86551] New: [ICE] bare class and select type


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86551

            Bug ID: 86551
           Summary: [ICE] bare class and select type
           Product: gcc
           Version: 8.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: daanvanvugt at gmail dot com
  Target Milestone: ---

The following program produces an internal compiler error for me.

module a
  type, abstract :: t1
  end type
  type, extends(t1) :: t2
  end type
contains
  subroutine b
    implicit none
    class(t1) :: c2

    select type (d => c2)
    end select type
  end subroutine b
end module a


Removing the select type statement gives the expected error:
a.f90:9:19:

     class(t1) :: c2
                   1
Error: CLASS variable ‘c2’ at (1) must be dummy, allocatable or pointer

Adding allocatable or pointer attributes fixes the ICE.

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