[Bug fortran/94347] New: Assignment pointer at declaration

rondam at yandex dot ru gcc-bugzilla@gcc.gnu.org
Thu Mar 26 19:36:38 GMT 2020


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.


More information about the Gcc-bugs mailing list