public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/94347] New: Assignment pointer at declaration
@ 2020-03-26 19:36 rondam at yandex dot ru
  2020-03-26 20:10 ` [Bug fortran/94347] " kargl at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rondam at yandex dot ru @ 2020-03-26 19:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94347
           Summary: Assignment pointer at declaration
           Product: gcc
           Version: 8.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rondam at yandex dot ru
  Target Milestone: ---

I am trying to compile the code:
program main
    character(10), target :: a
    character(:), pointer :: p => null()
    p => a
end program main

gfortran version 8.3.0 produces:
internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1820 
gfortran version 7.5.0 produces:
internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1777

But this:
program main
    character(10), target :: a
    character(:), pointer :: p
    p => null()
    p => a
end program main

or this:

program main
    character, dimension(10), target :: a
    character, dimension(:), pointer :: p => null()
    p => a
end program main

is compliled ok.

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

end of thread, other threads:[~2020-04-19 12:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 19:36 [Bug fortran/94347] New: Assignment pointer at declaration rondam at yandex dot ru
2020-03-26 20:10 ` [Bug fortran/94347] " kargl at gcc dot gnu.org
2020-04-19 11:53 ` tkoenig at gcc dot gnu.org
2020-04-19 12:06 ` cvs-commit at gcc dot gnu.org
2020-04-19 12:08 ` cvs-commit at gcc dot gnu.org
2020-04-19 12:15 ` tkoenig 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).