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

--- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to José Rui Faustino de Sousa from comment #7)
> Hi all!
> 
> Still ICEs with 9/10/11 using -ftrapv -fcheck=bounds
> 
> Best regards,
> José Rui

Yes, indeed. This with those compile options

module m
   type s
      class(*), allocatable :: a[:]    ! This ICEd
   end type
end

gives

../pr91726/pr91726.f90:5:3:

    5 | end
      |   ^
Error: mismatching comparison operand types
integer(kind=8)
unsigned long
if (_10 != 1) goto <D.4205>; else goto <D.4206>;
../pr91726/pr91726.f90:5:3: internal compiler error: ‘verify_gimple’ failed
0xec247d verify_gimple_in_seq(gimple*)
        ../../gcc/gcc/tree-cfg.c:5119

The problem appears to lie in the bounds checking in
trans-expr.c(gfc_copy_class_to_class) at line 1425 in master. It is produced by
the vtable _copy function.

For some reason that I cannot see from the code, 10-branch compiles this
snippet just fine, while 9-branch produces a completely different error.

It's now in my spreadsheet as an intersting one!

Paul

Reply via email to