diff options
author | Roger Sayle <roger@eyesopen.com> | 2002-08-04 02:08:20 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2002-08-04 02:08:20 +0000 |
commit | 313c9c54041980c6386f81111b3f2b4d20384f06 (patch) | |
tree | 9eb6f16ea25b266c8d826244ef9af3c80d7cd457 /gcc | |
parent | e34eaae5f3c9067a2ad835ba70bccd7e001ba058 (diff) | |
download | gcc-313c9c54041980c6386f81111b3f2b4d20384f06.zip gcc-313c9c54041980c6386f81111b3f2b4d20384f06.tar.gz gcc-313c9c54041980c6386f81111b3f2b4d20384f06.tar.bz2 |
* gcc.dg/builtins-1.c: New testcase.
From-SVN: r56012
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/builtins-1.c | 28 |
2 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84a018f..a3d5578 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-08-03 Roger Sayle <roger@eyesopen.com> + + * gcc.dg/builtins-1.c: New testcase. + 2002-08-02 Mark Mitchell <mark@codesourcery.com> * g++.dg/inherit/access3.C: New test. diff --git a/gcc/testsuite/gcc.dg/builtins-1.c b/gcc/testsuite/gcc.dg/builtins-1.c new file mode 100644 index 0000000..6b4044c --- /dev/null +++ b/gcc/testsuite/gcc.dg/builtins-1.c @@ -0,0 +1,28 @@ +/* Copyright (C) 2002 Free Software Foundation. + + Verify that all the __builtin_ math functions are recognized + by the compiler. + + Written by Roger Sayle, 11th July 2002. */ + +/* { dg-do compile } */ +/* { dg-final { scan-assembler-not "__builtin_" } } */ + +double test1(double x) { return __builtin_sqrt(x); } +double test2(double x) { return __builtin_cos(x); } +double test3(double x) { return __builtin_sin(x); } +double test4(double x) { return __builtin_exp(x); } +double test5(double x) { return __builtin_log(x); } + +float test1f(float x) { return __builtin_sqrtf(x); } +float test2f(float x) { return __builtin_cosf(x); } +float test3f(float x) { return __builtin_sinf(x); } +float test4f(float x) { return __builtin_expf(x); } +float test5f(float x) { return __builtin_logf(x); } + +long double test1l(long double x) { return __builtin_sqrtl(x); } +long double test2l(long double x) { return __builtin_cosl(x); } +long double test3l(long double x) { return __builtin_sinl(x); } +long double test4l(long double x) { return __builtin_expl(x); } +long double test5l(long double x) { return __builtin_logl(x); } + |