public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*)
@ 2022-01-07 15:43 antony at cosmologist dot info
  2022-01-07 16:24 ` [Bug fortran/103942] " antony at cosmologist dot info
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: antony at cosmologist dot info @ 2022-01-07 15:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103942
           Summary: [10 Regression] invalid memory reference with
                    allocatable string and class(*)
           Product: gcc
           Version: 10.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antony at cosmologist dot info
  Target Milestone: ---

The code works as expected in 9.3.1 20200614. In 10.3.1 20220107 and trunk it
gives

Program received signal SIGSEGV: Segmentation fault - invalid memory reference.



    program tester

    character(LEN=:), allocatable :: S

    S = 'CMB'
    call TT(trim(S))

    contains

    subroutine TT(S)
    class(*), intent(in) :: S
    class(*), allocatable :: S2

    allocate(S2, source=S)

    end subroutine TT


    end program tester

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

* [Bug fortran/103942] [10 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
@ 2022-01-07 16:24 ` antony at cosmologist dot info
  2022-01-07 16:57 ` marxin at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: antony at cosmologist dot info @ 2022-01-07 16:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Antony Lewis <antony at cosmologist dot info> ---
Also broken in 9.4.1 20220107.

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

* [Bug fortran/103942] [10 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
  2022-01-07 16:24 ` [Bug fortran/103942] " antony at cosmologist dot info
@ 2022-01-07 16:57 ` marxin at gcc dot gnu.org
  2022-01-07 17:44 ` anlauf at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-07 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-01-07
             Status|UNCONFIRMED                 |NEW
                 CC|                            |anlauf at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org,
                   |                            |pault at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-6928-g4225af228b5d52e8 and was fixed on master with
r12-1005-gfe03f4fc9548b3fd.

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

* [Bug fortran/103942] [10 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
  2022-01-07 16:24 ` [Bug fortran/103942] " antony at cosmologist dot info
  2022-01-07 16:57 ` marxin at gcc dot gnu.org
@ 2022-01-07 17:44 ` anlauf at gcc dot gnu.org
  2022-01-07 18:05 ` anlauf at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-07 17:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from anlauf at gcc dot gnu.org ---
(In reply to Martin Liška from comment #2)
> Started with r11-6928-g4225af228b5d52e8 and was fixed on master with
> r12-1005-gfe03f4fc9548b3fd.

Backporting r12-1005 (see pr100551) fixes the segfault in comment#0 also
for 10-branch.

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

* [Bug fortran/103942] [10 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
                   ` (2 preceding siblings ...)
  2022-01-07 17:44 ` anlauf at gcc dot gnu.org
@ 2022-01-07 18:05 ` anlauf at gcc dot gnu.org
  2022-01-08  3:47 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-07 18:05 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Build|                            |2022-01-07 0:00

--- Comment #4 from anlauf at gcc dot gnu.org ---
Fixed on 10-branch with r10-10384.

Cherrypicking that patch however does not fix the issue on 9-branch.
There must be something else missing which would need backporting.

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

* [Bug fortran/103942] [10 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
                   ` (3 preceding siblings ...)
  2022-01-07 18:05 ` anlauf at gcc dot gnu.org
@ 2022-01-08  3:47 ` pinskia at gcc dot gnu.org
  2022-01-10 10:54 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-08  3:47 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.4
           Keywords|                            |wrong-code

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

* [Bug fortran/103942] [10 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
                   ` (4 preceding siblings ...)
  2022-01-08  3:47 ` pinskia at gcc dot gnu.org
@ 2022-01-10 10:54 ` rguenth at gcc dot gnu.org
  2022-01-17 19:53 ` [Bug fortran/103942] [9 " anlauf at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-10 10:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

* [Bug fortran/103942] [9 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
                   ` (5 preceding siblings ...)
  2022-01-10 10:54 ` rguenth at gcc dot gnu.org
@ 2022-01-17 19:53 ` anlauf at gcc dot gnu.org
  2022-06-28 10:47 ` jakub at gcc dot gnu.org
  2022-06-28 19:46 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-01-17 19:53 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[10 Regression] invalid     |[9 Regression] invalid
                   |memory reference with       |memory reference with
                   |allocatable string and      |allocatable string and
                   |class(*)                    |class(*)
      Known to fail|                            |9.4.1

--- Comment #5 from anlauf at gcc dot gnu.org ---
After the backport this should have been marked as 9-regression.  Doing so now.

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

* [Bug fortran/103942] [9 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
                   ` (6 preceding siblings ...)
  2022-01-17 19:53 ` [Bug fortran/103942] [9 " anlauf at gcc dot gnu.org
@ 2022-06-28 10:47 ` jakub at gcc dot gnu.org
  2022-06-28 19:46 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 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] 10+ messages in thread

* [Bug fortran/103942] [9 Regression] invalid memory reference with allocatable string and class(*)
  2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
                   ` (7 preceding siblings ...)
  2022-06-28 10:47 ` jakub at gcc dot gnu.org
@ 2022-06-28 19:46 ` anlauf at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: anlauf at gcc dot gnu.org @ 2022-06-28 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

anlauf at gcc dot gnu.org changed:

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

--- Comment #7 from anlauf at gcc dot gnu.org ---
Fixed for gcc-10.4.

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

end of thread, other threads:[~2022-06-28 19:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-07 15:43 [Bug fortran/103942] New: [10 Regression] invalid memory reference with allocatable string and class(*) antony at cosmologist dot info
2022-01-07 16:24 ` [Bug fortran/103942] " antony at cosmologist dot info
2022-01-07 16:57 ` marxin at gcc dot gnu.org
2022-01-07 17:44 ` anlauf at gcc dot gnu.org
2022-01-07 18:05 ` anlauf at gcc dot gnu.org
2022-01-08  3:47 ` pinskia at gcc dot gnu.org
2022-01-10 10:54 ` rguenth at gcc dot gnu.org
2022-01-17 19:53 ` [Bug fortran/103942] [9 " anlauf at gcc dot gnu.org
2022-06-28 10:47 ` jakub at gcc dot gnu.org
2022-06-28 19:46 ` anlauf 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).