This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/57245] Floating-point constant truncation ignores -frounding-math
- From: "nsz at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 20 Apr 2017 10:56:38 +0000
- Subject: [Bug tree-optimization/57245] Floating-point constant truncation ignores -frounding-math
- Auto-submitted: auto-generated
- References: <bug-57245-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57245
--- Comment #3 from nsz at gcc dot gnu.org ---
note that this may cause the omission of underflow, overflow and inexact
exceptions too (so in principle it's an invalid transformation even
without -frounding-math but with -ftrapping-math ):
float x,y;
void f(void)
{
x = 0x1p-1000; // truncated to 0
y = 0x1p1000; // truncated to inf
}