[Bug fortran/107872] New: ICE on recursive DT with DTIO
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107872 Bug ID: 107872 Summary: ICE on recursive DT with DTIO Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jwmwalrus at gmail dot com Target Milestone: --- Hi. The code below throws the following ICE: $ gfortran -c -fbacktrace test2.f90 gfortran: internal compiler error: Segmentation fault signal terminated program f951 Please submit a full bug report, with preprocessed source (by using -freport-bug). See for instructions. --8<-- module mod1 type t integer :: data type(t), allocatable :: next contains procedure, private :: write_t generic :: write(formatted) => write_t end type contains recursive subroutine write_t(this, unit, iotype, v_list, iostat, iomsg) class(t), intent(in) :: this integer, intent(in) :: unit character(*), intent(in) :: iotype integer, intent(in) :: v_list(:) integer, intent(out) :: iostat character(*), intent(inout) :: iomsg if (ALLOCATED(this%next)) & write (unit, '(dt)') this%next end subroutine end module -->8-- $ gfortran --version GNU Fortran (Debian 12.2.0-9) 12.2.0 Copyright (C) 2022 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[Bug fortran/107742] New: class mismatch in passed procedure
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107742 Bug ID: 107742 Summary: class mismatch in passed procedure Product: gcc Version: 12.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: fortran Assignee: unassigned at gcc dot gnu.org Reporter: jwmwalrus at gmail dot com Target Milestone: --- Hi. The code below throws the following error: 51 | if (this%match(my_proc, 5)) continue | 1 Error: Interface mismatch in dummy procedure ‘proc’ at (1): Type mismatch in argument 'this' (CLASS(a)/CLASS(b)) --8<-- module mod1 type, abstract :: a contains procedure(i_match), deferred :: match end type abstract interface subroutine i_proc(this, i) import class(a), intent(inout) :: this integer, intent(in) :: i end subroutine function i_match(this, proc, i) result(cond) import logical :: cond class(a), intent(inout) :: this procedure(i_proc) :: proc integer, intent(in) :: i end function end interface type, extends(a) :: b contains procedure :: match => match_b procedure :: exec end type interface module subroutine exec(this) class(b), intent(inout) :: this end subroutine end interface contains function match_b(this, proc, i) result(cond) logical :: cond class(b), intent(inout) :: this procedure(i_proc) :: proc integer, intent(in) :: i call proc(this, i) cond = .true. end function subroutine my_proc(this, i) class(b), intent(inout) :: this integer, intent(in) :: i end subroutine end module submodule (mod1) smod1 contains module procedure exec if (this%match(my_proc, 5)) continue end procedure end submodule -->8-- Since type b extends type a, doesn't my_proc satisfy the i_proc interface?
[Bug fortran/104630] module subroutine not accessible from submodule
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104630 --- Comment #2 from John --- This issue is still in v12.2.0.