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

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