[Bug fortran/71799] New: [7 Regression] ICE in DO loop code emission (gfc_resolve_iterator)
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jul 7 16:06:00 GMT 2016
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71799
Bug ID: 71799
Summary: [7 Regression] ICE in DO loop code emission
(gfc_resolve_iterator)
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: marxin at gcc dot gnu.org
Target Milestone: ---
Hello.
Accidentally, I came to the following code that triggers an ICE:
$ gfortran ~/Programming/testcases/do-loop-ice.f90
/home/marxin/Programming/testcases/do-loop-ice.f90:5:24:
do i = 10, HUGE(i) - 10, 222
1
Error: Arithmetic overflow converting INTEGER(4) to INTEGER(1) at (1). This
check can be disabled with the option ‘-fno-range-check’
/home/marxin/Programming/testcases/do-loop-ice.f90:5:24: internal compiler
error: Can't convert ‘INTEGER(4)’ to ‘INTEGER(1)’ at (1)
0x687f81 gfc_internal_error(char const*, ...)
../../gcc/fortran/error.c:1312
0x6a2a8f gfc_convert_type_warn(gfc_expr*, gfc_typespec*, int, int)
../../gcc/fortran/intrinsic.c:4795
0x6ea76a gfc_resolve_iterator(gfc_iterator*, bool, bool)
../../gcc/fortran/resolve.c:6526
0x6ec76d gfc_resolve_code(gfc_code*, gfc_namespace*)
../../gcc/fortran/resolve.c:10689
0x6eec92 resolve_codes
../../gcc/fortran/resolve.c:15667
0x6eed81 gfc_resolve(gfc_namespace*)
../../gcc/fortran/resolve.c:15701
0x6da18a resolve_all_program_units
../../gcc/fortran/parse.c:5825
0x6da18a gfc_parse_file()
../../gcc/fortran/parse.c:6077
0x71c5c2 gfc_be_parse_file
../../gcc/fortran/f95-lang.c:198
where:
$ cat ~/Programming/testcases/do-loop-ice.f90
subroutine test2(array, s, block)
integer(1) :: i, block(9), array(2)
integer (8) :: s
do i = 10, HUGE(i) - 10, 222
s = s + 1
end do
end subroutine test2
I'll prepare fix for that.
More information about the Gcc-bugs
mailing list