public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/107900] New: Select type with intrinsic type inside associate causes ICE / Segmenation fault
@ 2022-11-28 20:43 kaiserkarl31 at yahoo dot com
  2022-11-28 20:54 ` [Bug fortran/107900] " anlauf at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: kaiserkarl31 at yahoo dot com @ 2022-11-28 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107900
           Summary: Select type with intrinsic type inside associate
                    causes ICE / Segmenation fault
           Product: gcc
           Version: 12.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: kaiserkarl31 at yahoo dot com
  Target Milestone: ---

Using a polymorphic derived type element in a select type statement is not
allowed, but placing it in an associate block causes an internal compiler error
if one of the "type is" statements includes an intrinsic type. The following
program is enough to reproduce it in GFortran 12.2.1:

program test

   class(*), pointer :: ptr
   associate (c => ptr)
      select type (c)
         type is (integer)
            print *, 'integer'
      end select
   end associate

end program test

Note that the above program wouldn't run, as "ptr" isn't associated with
anything, but it shouldn't generate an ICE either.

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

end of thread, other threads:[~2023-06-21 21:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 20:43 [Bug fortran/107900] New: Select type with intrinsic type inside associate causes ICE / Segmenation fault kaiserkarl31 at yahoo dot com
2022-11-28 20:54 ` [Bug fortran/107900] " anlauf at gcc dot gnu.org
2023-06-16 17:01 ` pault at gcc dot gnu.org
2023-06-21 16:06 ` cvs-commit at gcc dot gnu.org
2023-06-21 21:05 ` 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).