re PR testsuite/36332 (FAIL: gcc.dg/torture/type-generic-1.c execution test on powerpc-*)

PR target/36332
	* 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.

From-SVN: r139906
This commit is contained in:
Jakub Jelinek 2008-09-02 20:46:29 +02:00 committed by Jakub Jelinek
parent 75c9cbe355
commit c83c7e7e47
4 changed files with 25 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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.

View File

@ -2417,7 +2417,7 @@ real_maxval (REAL_VALUE_TYPE *r, int sign, enum machine_mode mode)
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);
}
}

View File

@ -1,5 +1,8 @@
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.

View File

@ -0,0 +1,15 @@
/* 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;
}