mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-06 04:00:25 +08:00
builtin-math-2.c: Split out fma tests...
* gcc.dg/torture/builtin-math-2.c: Split out fma tests... * gcc.dg/torture/builtin-math-8.c: ... here. New file. Use builtin_constant_p rather than scanning for builtin name. From-SVN: r166791
This commit is contained in:
parent
93f9a911c3
commit
3ca35fbd59
@ -1,3 +1,9 @@
|
||||
2010-11-15 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* gcc.dg/torture/builtin-math-2.c: Split out fma tests...
|
||||
* gcc.dg/torture/builtin-math-8.c: ... here. New file.
|
||||
Use builtin_constant_p rather than scanning for builtin name.
|
||||
|
||||
2010-11-15 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc.dg/property/dotsyntax-18.m: New.
|
||||
|
@ -184,18 +184,6 @@ void bar()
|
||||
fool (__builtin_powl (__LDBL_MAX__, -3.5L));
|
||||
TESTIT2 (pow, 2.0, -0x1p50);
|
||||
|
||||
foof (__builtin_fmaf (__FLT_MAX__, __FLT_MAX__, 0.0F));
|
||||
foof (__builtin_fmaf (__FLT_MAX__, 1.0F, __FLT_MAX__));
|
||||
foof (__builtin_fmaf (__FLT_MIN__, __FLT_MIN__, 0.0F));
|
||||
|
||||
foo (__builtin_fma (__DBL_MAX__, __DBL_MAX__, 0.0));
|
||||
foo (__builtin_fma (__DBL_MAX__, 1.0, __DBL_MAX__));
|
||||
foo (__builtin_fma (__DBL_MIN__, __DBL_MIN__, 0.0));
|
||||
|
||||
fool (__builtin_fmal (__LDBL_MAX__, __LDBL_MAX__, 0.0L));
|
||||
fool (__builtin_fmal (__LDBL_MAX__, 1.0L, __LDBL_MAX__));
|
||||
fool (__builtin_fmal (__LDBL_MIN__, __LDBL_MIN__, 0.0L));
|
||||
|
||||
/* The sqrt arg must be [0 ... Inf] inclusive. */
|
||||
TESTIT (sqrt, -0.5);
|
||||
TESTIT (sqrt, -0.0);
|
||||
@ -351,9 +339,6 @@ void bar()
|
||||
/* { dg-final { scan-tree-dump-times "powf" 13 "original" { target { ! { spu*-*-* } } } } } */
|
||||
/* { dg-final { scan-tree-dump-times "powf" 7 "original" { target { spu*-*-* } } } } */
|
||||
/* { dg-final { scan-tree-dump-times "powl" 13 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "fma " 3 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "fmaf" 3 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "fmal" 3 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "sqrt " 1 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "sqrtf" 1 "original" } } */
|
||||
/* { dg-final { scan-tree-dump-times "sqrtl" 1 "original" } } */
|
||||
|
34
gcc/testsuite/gcc.dg/torture/builtin-math-8.c
Normal file
34
gcc/testsuite/gcc.dg/torture/builtin-math-8.c
Normal file
@ -0,0 +1,34 @@
|
||||
/* { dg-do link } */
|
||||
|
||||
extern void link_error (void);
|
||||
|
||||
int main()
|
||||
{
|
||||
if (!__builtin_constant_p(1.0))
|
||||
link_error ();
|
||||
if (!__builtin_constant_p(__builtin_fma (1.0, 1.0, 1.0)))
|
||||
link_error ();
|
||||
|
||||
if (__builtin_constant_p(__builtin_fmaf (__FLT_MAX__, __FLT_MAX__, 0.0F)))
|
||||
link_error ();
|
||||
if (__builtin_constant_p(__builtin_fmaf (__FLT_MAX__, 1.0F, __FLT_MAX__)))
|
||||
link_error ();
|
||||
if (__builtin_constant_p(__builtin_fmaf (__FLT_MIN__, __FLT_MIN__, 0.0F)))
|
||||
link_error ();
|
||||
|
||||
if (__builtin_constant_p(__builtin_fma (__DBL_MAX__, __DBL_MAX__, 0.0)))
|
||||
link_error ();
|
||||
if (__builtin_constant_p(__builtin_fma (__DBL_MAX__, 1.0, __DBL_MAX__)))
|
||||
link_error ();
|
||||
if (__builtin_constant_p(__builtin_fma (__DBL_MIN__, __DBL_MIN__, 0.0)))
|
||||
link_error ();
|
||||
|
||||
if (__builtin_constant_p(__builtin_fmal (__LDBL_MAX__, __LDBL_MAX__, 0.0L)))
|
||||
link_error ();
|
||||
if (__builtin_constant_p(__builtin_fmal (__LDBL_MAX__, 1.0L, __LDBL_MAX__)))
|
||||
link_error ();
|
||||
if (__builtin_constant_p(__builtin_fmal (__LDBL_MIN__, __LDBL_MIN__, 0.0L)))
|
||||
link_error ();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user