This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/78741] New: ICE in gfc_get_symbol_decl, at fortran/trans-decl.c:1534


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

            Bug ID: 78741
           Summary: ICE in gfc_get_symbol_decl, at
                    fortran/trans-decl.c:1534
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gerhard.steinmetz.fortran@t-online.de
  Target Milestone: ---

With invalid code (symbol "g" name clash), down to at least 4.8.


$ cat z1.f90
subroutine s(n, x)
   integer :: n
   character(n) :: x
   character, pointer :: z(:)
   x = 'a'
   return
entry g(n, x)
   x = 'b'
contains
   subroutine g
      z(1) = x(1:1)
   end
end


$ gfortran-7-20161204 -c z1.f90
z1.f90:11:0:

       z(1) = x(1:1)

internal compiler error: in gfc_get_symbol_decl, at fortran/trans-decl.c:1534
0x75b49a gfc_get_symbol_decl(gfc_symbol*)
        ../../gcc/fortran/trans-decl.c:1533
0x7731af gfc_conv_variable
        ../../gcc/fortran/trans-expr.c:2494
0x76ee42 gfc_conv_expr(gfc_se*, gfc_expr*)
        ../../gcc/fortran/trans-expr.c:7771
0x7789e2 gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:9821
0x72e687 trans_code
        ../../gcc/fortran/trans.c:1790
0x75f708 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6271
0x75f557 gfc_generate_contained_functions
        ../../gcc/fortran/trans-decl.c:5251
0x75f557 gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:6200
0x6e73d0 translate_all_program_units
        ../../gcc/fortran/parse.c:6038
0x6e73d0 gfc_parse_file()
        ../../gcc/fortran/parse.c:6238
0x72b182 gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:202

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]