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

* [Bug fortran/100815] [10.3, 11 regression] Segfault assigning to scalar allocatable polymorphic LHS
  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 ` 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
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: neil.n.carlson at gmail dot com @ 2021-05-28 15:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Neil Carlson <neil.n.carlson at gmail dot com> ---
Actually it looks like the regression was introduced in 10.3. It works in 10.2
and earlier.

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

* [Bug fortran/100815] [10/11/12 Regression] Segfault assigning to scalar allocatable polymorphic LHS
  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 ` 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
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-31  6:51 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code
            Summary|[10.3, 11 regression]       |[10/11/12 Regression]
                   |Segfault assigning to       |Segfault assigning to
                   |scalar allocatable          |scalar allocatable
                   |polymorphic LHS             |polymorphic LHS
   Target Milestone|---                         |10.4
      Known to fail|                            |10.3.0
      Known to work|                            |10.2.0

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

* [Bug fortran/100815] [10/11/12 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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 ` marxin at gcc dot gnu.org
  2022-01-17 14:37 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-05-31  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
            Summary|[10/11/12 Regression]       |[10/11/12 Regression]
                   |Segfault assigning to       |Segfault assigning to
                   |scalar allocatable          |scalar allocatable
                   |polymorphic LHS             |polymorphic LHS since
                   |                            |r11-6253-gce8dcc9105cbd404
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |pault at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-05-31

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-6253-gce8dcc9105cbd404.

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

* [Bug fortran/100815] [10/11/12 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (2 preceding siblings ...)
  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
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-17 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4

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

* [Bug fortran/100815] [10/11/12/13 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (3 preceding siblings ...)
  2022-01-17 14:37 ` rguenth at gcc dot gnu.org
@ 2022-06-28 10:45 ` 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
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:45 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug fortran/100815] [10/11/12/13/14 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (4 preceding siblings ...)
  2022-06-28 10:45 ` [Bug fortran/100815] [10/11/12/13 " jakub at gcc dot gnu.org
@ 2023-04-19  9:12 ` pault at gcc dot gnu.org
  2023-04-19  9:31 ` [Bug fortran/100815] [10/11 " marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu.org @ 2023-04-19  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Hi Martin,

This is fixed in 12-branch onwards.

I have not been able to find the fix - could you find it, please? I tried
comparing the diff in comment #2 with the current head but the differences in
the affected code didn't do the job.

Cheers

Paul

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

* [Bug fortran/100815] [10/11 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (5 preceding siblings ...)
  2023-04-19  9:12 ` [Bug fortran/100815] [10/11/12/13/14 " pault at gcc dot gnu.org
@ 2023-04-19  9:31 ` marxin at gcc dot gnu.org
  2023-04-20  6:46 ` pault at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-04-19  9:31 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10/11/12/13/14 Regression] |[10/11 Regression] Segfault
                   |Segfault assigning to       |assigning to scalar
                   |scalar allocatable          |allocatable polymorphic LHS
                   |polymorphic LHS since       |since
                   |r11-6253-gce8dcc9105cbd404  |r11-6253-gce8dcc9105cbd404

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
It's fixed on master with r12-3897-g00f6de9c691195.

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

* [Bug fortran/100815] [10/11 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (6 preceding siblings ...)
  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
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu.org @ 2023-04-20  6:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #5)
> It's fixed on master with r12-3897-g00f6de9c691195.

Many thanks, Martin.

I'll try to apply it to 11-branch, if for no other reason than to see if it
does so cleanly. Tobias must have thought that it was too invasive to backport.

So I can keep track, September 2021:
https://gcc.gnu.org/g:00f6de9c69119594f7dad3bd525937c94c8200d0

Paul

PS How do you do this location - by hand or do you have a script to do the
bisection?

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

* [Bug fortran/100815] [10/11 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (7 preceding siblings ...)
  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
  10 siblings, 0 replies; 12+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-04-20  7:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
> Many thanks, Martin.

You're welcome!

> PS How do you do this location - by hand or do you have a script to do the
> bisection?

I have a script that uses pre-built GCC binaries:
https://github.com/marxin/script-misc/blob/master/gcc-bisect.py

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

* [Bug fortran/100815] [11 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (8 preceding siblings ...)
  2023-04-20  7:55 ` marxin at gcc dot gnu.org
@ 2023-07-07 10:40 ` rguenth at gcc dot gnu.org
  2024-04-25  6:35 ` pault at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:40 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.5                        |11.5

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.

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

* [Bug fortran/100815] [11 Regression] Segfault assigning to scalar allocatable polymorphic LHS since r11-6253-gce8dcc9105cbd404
  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
                   ` (9 preceding siblings ...)
  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
  10 siblings, 0 replies; 12+ messages in thread
From: pault at gcc dot gnu.org @ 2024-04-25  6:35 UTC (permalink / raw)
  To: gcc-bugs

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

Paul Thomas <pault at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WONTFIX
             Status|NEW                         |RESOLVED

--- Comment #9 from Paul Thomas <pault at gcc dot gnu.org> ---
(In reply to Paul Thomas from comment #6)
> (In reply to Martin Liška from comment #5)
> > It's fixed on master with r12-3897-g00f6de9c691195.
> 
> Many thanks, Martin.
> 
> I'll try to apply it to 11-branch, if for no other reason than to see if it
> does so cleanly. Tobias must have thought that it was too invasive to
> backport.
> 

I think that we should take this view, given the imminent opening of 15-branch.

Cheers

Paul

^ 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).