[Bug fortran/77643] New: ICE with "character(len=:), pointer :: p => null()"
mrestelli at gmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Sep 19 12:36:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77643
Bug ID: 77643
Summary: ICE with "character(len=:), pointer :: p => null()"
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: mrestelli at gmail dot com
Target Milestone: ---
The attached code produces an internal compiler error. It seems that,
in order to trigger the error, both LEN=: and =>NULL() are
necessary.
module m
implicit none
character(len=:), pointer :: r ! works
character(len=5), pointer :: s => null() ! works
character(len=:), pointer :: p => null() ! ICE
end module m
$ gfortran --version
GNU Fortran (GCC) 7.0.0 20160919 (experimental)
$ gfortran -c m.f90
f951: internal compiler error: in gfc_get_symbol_decl, bei
fortran/trans-decl.c:1695
0x6b1022 gfc_get_symbol_decl(gfc_symbol*)
gcc/fortran/trans-decl.c:1695
0x6b2e18 gfc_create_module_variable
gcc/fortran/trans-decl.c:4727
0x67b75b do_traverse_symtree
gcc/fortran/symbol.c:3939
0x6b57bb gfc_generate_module_vars(gfc_namespace*)
gcc/fortran/trans-decl.c:5170
0x694319 gfc_generate_module_code(gfc_namespace*)
gcc/fortran/trans.c:2030
0x64bfcb translate_all_program_units
gcc/fortran/parse.c:5923
0x64bfcb gfc_parse_file()
gcc/fortran/parse.c:6142
0x68d7c2 gfc_be_parse_file
gcc/fortran/f95-lang.c:198
More information about the Gcc-bugs
mailing list