public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/100815] New: [11 regression] Segfault assigning to scalar allocatable polymorphic LHS
@ 2021-05-28 15:14 neil.n.carlson at gmail dot com
  2021-05-28 15:38 ` [Bug fortran/100815] [10.3, 11 " neil.n.carlson at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: neil.n.carlson at gmail dot com @ 2021-05-28 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100815
           Summary: [11 regression] Segfault assigning to scalar
                    allocatable polymorphic LHS
           Product: gcc
           Version: 11.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: neil.n.carlson at gmail dot com
  Target Milestone: ---

The current head of the gcc-11 branch segfaults on the assignment statement in
the following program. The program runs without error with the 10.x and 9.x
compilers.

type, abstract :: func
end type

type, extends(func) :: const_func
  real :: c = 0.0
end type

type :: func_box
  class(func), allocatable :: f
end type

type :: foo
  type(func_box), allocatable :: farray(:)
end type

type(const_func) :: f
type(foo) :: this

allocate(this%farray(2))
this%farray(size(this%farray))%f = f

end

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

end of thread, other threads:[~2024-04-25  6:35 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 15:14 [Bug fortran/100815] New: [11 regression] Segfault assigning to scalar allocatable polymorphic LHS neil.n.carlson at gmail dot com
2021-05-28 15:38 ` [Bug fortran/100815] [10.3, 11 " neil.n.carlson at gmail dot com
2021-05-31  6:51 ` [Bug fortran/100815] [10/11/12 Regression] " rguenth at gcc dot gnu.org
2021-05-31  8:43 ` [Bug fortran/100815] [10/11/12 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404 marxin at gcc dot gnu.org
2022-01-17 14:37 ` rguenth at gcc dot gnu.org
2022-06-28 10:45 ` [Bug fortran/100815] [10/11/12/13 " jakub at gcc dot gnu.org
2023-04-19  9:12 ` [Bug fortran/100815] [10/11/12/13/14 " pault at gcc dot gnu.org
2023-04-19  9:31 ` [Bug fortran/100815] [10/11 " marxin at gcc dot gnu.org
2023-04-20  6:46 ` pault at gcc dot gnu.org
2023-04-20  7:55 ` marxin at gcc dot gnu.org
2023-07-07 10:40 ` [Bug fortran/100815] [11 " rguenth at gcc dot gnu.org
2024-04-25  6:35 ` 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).