This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcc/69233] New: fixtfti returns bad value for TI overflow
- From: "munroesj at us dot ibm.com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 11 Jan 2016 20:19:58 +0000
- Subject: [Bug libgcc/69233] New: fixtfti returns bad value for TI overflow
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69233
Bug ID: 69233
Summary: fixtfti returns bad value for TI overflow
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
Assignee: unassigned at gcc dot gnu.org
Reporter: munroesj at us dot ibm.com
Target Milestone: ---
When converting IBM long double to __int128, large values that overflow are not
returning the expected values.
To be consistent with double to long conversions the conversion to __int128
should return saturated values and set Invalid Integer Convert (VXCVI)
floating-point exception.
For a large positive long double ( > 170141183460469231731687303715884105727.L)
I would expect 0x7fffffffffffffffffffffffffffffff (largest positive __int128)
but __fixtfti returns 0xffffffffffffffffffffffffffffffff
For large negative long double I would expect
0x80000000000000000000000000000000 (largest negative __int128) but __fixtfti
returns 000000000000000000000000000000000000001 or other small positive values.