From: No Author Date: Sat, 25 Jan 2003 16:02:11 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.2.2~83 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e66947353bbf37860f7abbebd65192ddf2d2186;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_2-branch'. From-SVN: r61777 --- 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; +}