https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99191
Bug ID: 99191 Summary: sanitizer detects undefined behaviour in libgfortran Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libfortran Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- ! from pr66311.f90 ! must be compiled and run with sanitized libgfortran !../../../gcc-150221/libgfortran/io/write.c:835:7: runtime error: negation of 0x80000000000000000000000000000000 cannot be represented in type '__int128'; cast to an unsigned type to negate this value to itself !../../../gcc-150221/libgfortran/runtime/string.c:199:11: runtime error: negation of 0x80000000000000000000000000000000 cannot be represented in type '__int128'; cast to an unsigned type to negate this value to itself use iso_fortran_env, only : ikinds => integer_kinds integer, parameter :: k = ikinds(size(ikinds)) write(*,*) -huge(0_k)-1 end