[Bug fortran/65173] New: ICE while compiling wrong code
valeryweber at hotmail dot com
gcc-bugzilla@gcc.gnu.org
Mon Feb 23 13:12:00 GMT 2015
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65173
Bug ID: 65173
Summary: ICE while compiling wrong code
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: valeryweber at hotmail dot com
Dear All
the following junk code is producing an ICE with 4.9.2
v
program min_obj
implicit none
integer, parameter :: string_length = 128
integer, parameter :: max_n_params = 256
type :: param_t
integer :: n= 0
real*8, dimension(256), allocatable :: x
real*8, dimension(2,256), allocatable :: bounds
character(string_length), dimension(256), allocatable :: names
end type param_t
contains
subroutine extrace_params_from_section ( )
character(*), dimension(), parameter :: char_params =
['element','parametrization']
end subroutine extrace_params_from_section
end program min_obj
gfortran-intel-4.9.2 test.f90
test.f90:7.45:
real*8, dimension(256), allocatable :: x
1
Error: Allocatable component of structure at (1) must have a deferred shape
test.f90:8.52:
real*8, dimension(2,256), allocatable :: bounds
1
Error: Allocatable component of structure at (1) must have a deferred shape
test.f90:9.67:
character(string_length), dimension(256), allocatable :: names
1
Error: Allocatable component of structure at (1) must have a deferred shape
test.f90:13.28:
character(*), dimension(), parameter :: char_params =
['element','parametrization']
1
Error: Expected expression in array specification at (1)
f951: internal compiler error: Segmentation fault
0x911b6f crash_signal
../../gcc-4.9.2/gcc/toplev.c:337
0x55d8b2 gfc_is_constant_expr(gfc_expr*)
../../gcc-4.9.2/gcc/fortran/expr.c:897
0x5bdc7f resolve_fl_derived0
../../gcc-4.9.2/gcc/fortran/resolve.c:12428
0x5bed77 resolve_fl_derived0
../../gcc-4.9.2/gcc/fortran/resolve.c:12019
0x5bed77 resolve_fl_derived
../../gcc-4.9.2/gcc/fortran/resolve.c:12629
0x5b9a9f resolve_symbol
../../gcc-4.9.2/gcc/fortran/resolve.c:12900
0x5d07db do_traverse_symtree
../../gcc-4.9.2/gcc/fortran/symbol.c:3630
0x5bcba4 resolve_types
../../gcc-4.9.2/gcc/fortran/resolve.c:14644
0x5b8920 gfc_resolve
../../gcc-4.9.2/gcc/fortran/resolve.c:14745
0x5a43fa resolve_all_program_units
../../gcc-4.9.2/gcc/fortran/parse.c:4886
0x5a43fa gfc_parse_file()
../../gcc-4.9.2/gcc/fortran/parse.c:5135
0x5e1695 gfc_be_parse_file
../../gcc-4.9.2/gcc/fortran/f95-lang.c:212
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
More information about the Gcc-bugs
mailing list