[Bug fortran/84734] [8 Regression] Compiling gfortran.dg/size_kind_(2|3).f90 with -fdefault-integer-8 gives an ICE
dominiq at lps dot ens.fr
gcc-bugzilla@gcc.gnu.org
Tue Mar 6 14:20:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84734
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
The following variant
integer(4) :: B(huge(1_4)+3_8,2_8)
integer(8) :: var1(2), var2, var3
print *, kind(B), size(B)
var1 = shape(B) ! { dg-error "SHAPE overflows its kind" }
print *, var1
var2 = size(B) ! { dg-error "SIZE overflows its kind" }
var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" }
end
gives the expected errors when compiled without -fdefault-integer-8, but
compile with -fdefault-integer-8 and gives at run time
4 4294967300
2147483650 2
More information about the Gcc-bugs
mailing list