diff options
author | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-25 14:54:09 +0000 |
---|---|---|
committer | hubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-25 14:54:09 +0000 |
commit | ae6318ddfb4835101cc71da67eee746476dfb384 (patch) | |
tree | e1279cfe933b56c9e6f82fb17a4ff05ec24e4ba7 /gcc | |
parent | bfab1b6909b1aa71fca05e53cfa6e4a1821ebeec (diff) | |
download | ppe42-gcc-ae6318ddfb4835101cc71da67eee746476dfb384.tar.gz ppe42-gcc-ae6318ddfb4835101cc71da67eee746476dfb384.zip |
* gcc.c-torture/execute/20030125-1.[cx]: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61771 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20030125-1.c | 61 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20030125-1.x | 3 |
3 files changed, 68 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 67a3558537a..e7699996575 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +Sat Jan 25 12:32:55 CET 2003 Jan HUbicka <jh@suse.cz> + + * gcc.c-torture/execute/20030125-1.[cx]: New test. + 2003-01-25 Paolo Carlini <pcarlini@unitus.it> Tweaks for Bison-1.875. From the NEWS file: 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 00000000000..318974a38b5 --- /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; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x new file mode 100644 index 00000000000..ae66af762eb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x @@ -0,0 +1,3 @@ +# Only Linux does inlclude all c99 functions at the moment. +if { ! [istarget "*linux*"] } { return 1 } +return 0 |