[Bug libfortran/81986] New: sanitizer detects negation of large number in string.c
zeccav at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Aug 25 15:27:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81986
Bug ID: 81986
Summary: sanitizer detects negation of large number in string.c
Product: gcc
Version: 8.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libfortran
Assignee: unassigned at gcc dot gnu.org
Reporter: zeccav at gmail dot com
Target Milestone: ---
Host: x86_64-pc-linux-gnu
Build: trunk 251201
! from test case pr66311.f90
! must be compiled and run
! 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
character(len=100) :: buffer
write(buffer,*) -huge(0_16)-1
end
More information about the Gcc-bugs
mailing list