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

--- Comment #3 from kargl at gcc dot gnu.org ---
The issue with charlen_15.f90 was fixed here:

https://gcc.gnu.org/ml/gcc-bugs/2016-12/msg01451.html

The issues with both charlen_03.f90 and charlen_10.f90
have nothing at all to do with a charlen.  The problem
is referencing an uninitialized array bound.  For *_03.f90
we have

program p
   type t
      character(1), allocatable :: x(n)
   end type
end

The variable 'n' is used, but not defined.  The backtrace is

0x87bac2a crash_signal
        /mnt/kargl/gcc/gcc/toplev.c:333
0x826ec1b resolve_variable
        /mnt/kargl/gcc/gcc/fortran/resolve.c:5048
0x826ec1b gfc_resolve_expr(gfc_expr*)
        /mnt/kargl/gcc/gcc/fortran/resolve.c:6492
0x81d7152 resolve_array_bound
        /mnt/kargl/gcc/gcc/fortran/array.c:327
0x81d7c6d gfc_resolve_array_spec(gfc_array_spec*, int)
        /mnt/kargl/gcc/gcc/fortran/array.c:368
0x826c9f0 resolve_component
        /mnt/kargl/gcc/gcc/fortran/resolve.c:13629
0x826d378 resolve_fl_derived0
        /mnt/kargl/gcc/gcc/fortran/resolve.c:13746
0x826d79e resolve_fl_derived0
        /mnt/kargl/gcc/gcc/fortran/resolve.c:13831
0x826d79e resolve_fl_derived
        /mnt/kargl/gcc/gcc/fortran/resolve.c:13823
0x826a226 resolve_symbol
        /mnt/kargl/gcc/gcc/fortran/resolve.c:14146
0x82898dd do_traverse_symtree
        /mnt/kargl/gcc/gcc/fortran/symbol.c:3986
0x8264f0d resolve_types
        /mnt/kargl/gcc/gcc/fortran/resolve.c:15999
0x826969e gfc_resolve(gfc_namespace*)
        /mnt/kargl/gcc/gcc/fortran/resolve.c:16112
0x825860b resolve_all_program_units
        /mnt/kargl/gcc/gcc/fortran/parse.c:5947
0x825860b gfc_parse_file()
        /mnt/kargl/gcc/gcc/fortran/parse.c:6194
0x829bc12 gfc_be_parse_file
        /mnt/kargl/gcc/gcc/fortran/f95-lang.c:202

Reply via email to