* real.c (real_maxval): Clear a lower bit to make real_maxval
match get_max_float for IBM long double format.
* gcc.c-torture/execute/ieee/pr36332.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139906
138bc75d-0d04-0410-961f-
82ee72b054a4
+2008-09-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/36332
+ * real.c (real_maxval): Clear a lower bit to make real_maxval
+ match get_max_float for IBM long double format.
+
2008-09-02 Andreas Schwab <schwab@suse.de>
* configure.ac: Use m4_quote to quote the expansion of m4_do.
required to be the value of the long double rounded to the
nearest double. Rounding means we need a slightly smaller
value for LDBL_MAX. */
- clear_significand_bit (r, SIGNIFICAND_BITS - fmt->pnan);
+ clear_significand_bit (r, SIGNIFICAND_BITS - fmt->pnan - 1);
}
}
2008-09-02 Jakub Jelinek <jakub@redhat.com>
+ PR target/36332
+ * gcc.c-torture/execute/ieee/pr36332.c: New test.
+
PR c/37171
* g++.dg/ext/attrib34.C: New test.
--- /dev/null
+/* PR target/36332 */
+
+int __attribute__((noinline, used))
+foo (long double ld)
+{
+ return ld == __builtin_infl ();
+}
+
+int
+main ()
+{
+ if (foo (__LDBL_MAX__))
+ __builtin_abort ();
+ return 0;
+}