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

--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fort...@t-online.de> 
---
Compiles and works without character branch (type is).


$ cat z3.f90
program p
   type t
      class(*), allocatable :: q(:)
   end type
   type(t) :: z
   integer :: a(3) = [1, 2, 3]
   real :: c(3) = [1.0, 2.0, 3.0]
   allocate (z%q(3), source=c)
   call s
contains
   subroutine s
      select type (x => z%q)
      type is (integer)
         if ( any(x/=a) )   call abort
      type is (real)
         if ( any(x/=c) )   call abort
      end select
   end
end


$ gfortran-7-20160731 -O2 z3.f90
$ a.out

Reply via email to