From 2e66947353bbf37860f7abbebd65192ddf2d2186 Mon Sep 17 00:00:00 2001 From: No Author Date: Sat, 25 Jan 2003 16:02:11 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'gcc-3_2-branch'. From-SVN: r61777 --- .../gcc.c-torture/execute/20030125-1.c | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/execute/20030125-1.c diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c new file mode 100644 index 000000000000..318974a38b5a --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c @@ -0,0 +1,61 @@ +/* Verify wehther math functions are simplified. */ +double sin(double); +double floor(double); +float +t(float a) +{ + return sin(a); +} +float +q(float a) +{ + return floor(a); +} +double +q1(float a) +{ + return floor(a); +} +float +q2(double a) +{ + return floor(a); +} +main() +{ +#ifdef __OPTIMIZE__ + if (t(0)!=0) + abort (); + if (q(0)!=0) + abort (); + if (q1(0)!=0) + abort (); + if (q2(0)!=0) + abort (); +#endif + return 0; +} +__attribute__ ((noinline)) +double +floor(double a) +{ + abort (); +} +__attribute__ ((noinline)) +float +floorf(float a) +{ + return a; +} +__attribute__ ((noinline)) +double +sin(double a) +{ + abort (); +} +__attribute__ ((noinline)) +float +sinf(float a) +{ + return a; +} -- 2.47.3