1 /* Copyright (C) 2002 Free Software Foundation. 2 3 Verify that all the __builtin_ math functions are recognized 4 by the compiler. 5 6 Written by Roger Sayle, 11th July 2002. */ 7 8 /* { dg-do compile } */ 9 /* { dg-final { scan-assembler-not "__builtin_" } } */ 10 test1(double x)11double test1(double x) { return __builtin_sqrt(x); } test2(double x)12double test2(double x) { return __builtin_cos(x); } test3(double x)13double test3(double x) { return __builtin_sin(x); } test4(double x)14double test4(double x) { return __builtin_exp(x); } test5(double x)15double test5(double x) { return __builtin_log(x); } 16 test1f(float x)17float test1f(float x) { return __builtin_sqrtf(x); } test2f(float x)18float test2f(float x) { return __builtin_cosf(x); } test3f(float x)19float test3f(float x) { return __builtin_sinf(x); } test4f(float x)20float test4f(float x) { return __builtin_expf(x); } test5f(float x)21float test5f(float x) { return __builtin_logf(x); } 22 test1l(long double x)23long double test1l(long double x) { return __builtin_sqrtl(x); } test2l(long double x)24long double test2l(long double x) { return __builtin_cosl(x); } test3l(long double x)25long double test3l(long double x) { return __builtin_sinl(x); } test4l(long double x)26long double test4l(long double x) { return __builtin_expl(x); } test5l(long double x)27long double test5l(long double x) { return __builtin_logl(x); } 28 29