public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/113363] New: ICE on ASSOCIATE and unlimited polymorphic function
@ 2024-01-12 20:31 anlauf at gcc dot gnu.org
  2024-01-14  8:54 ` [Bug fortran/113363] " pault at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: anlauf at gcc dot gnu.org @ 2024-01-12 20:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113363
           Summary: ICE on ASSOCIATE and unlimited polymorphic function
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: anlauf at gcc dot gnu.org
  Target Milestone: ---

While discussing a patch for PR89645/99065, the following issue with
ASSOCIATE and unlimited polymorphic functions was found:

https://gcc.gnu.org/pipermail/fortran/2024-January/060098.html

program p
  implicit none
  class(*), allocatable :: x(:)
  x = foo()
  call prt (x)
  deallocate (x)            ! up to here all is fine...
  associate (var => foo())  ! <- crash here
    call prt (var)          ! <- or here
  end associate
contains
  function foo() result(res)
    class(*), allocatable :: res(:)
    res = [42]
  end function foo
  subroutine prt (x)
    class(*), intent(in) :: x(:)
    select type (x)
    type is (integer)
       print *, x
    class default
       stop 99
    end select
  end subroutine prt
end


This ICEs on current trunk for any of the indicated statements.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-05-13  6:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-12 20:31 [Bug fortran/113363] New: ICE on ASSOCIATE and unlimited polymorphic function anlauf at gcc dot gnu.org
2024-01-14  8:54 ` [Bug fortran/113363] " pault at gcc dot gnu.org
2024-01-14  9:22 ` pault at gcc dot gnu.org
2024-01-17 14:46 ` pault at gcc dot gnu.org
2024-04-03 18:56 ` anlauf at gcc dot gnu.org
2024-04-04  6:27 ` pault at gcc dot gnu.org
2024-04-04 19:12 ` anlauf at gcc dot gnu.org
2024-04-06 10:05 ` pault at gcc dot gnu.org
2024-05-07  7:43 ` rguenth at gcc dot gnu.org
2024-05-13  6:27 ` cvs-commit at gcc dot gnu.org
2024-05-13  6:37 ` pault at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).