* gcc.c-torture/execute/20030125-1.[cx]: New test.
From-SVN: r61771
This commit is contained in:
parent
32d9a5bd17
commit
c506155455
@ -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:
|
||||
|
61
gcc/testsuite/gcc.c-torture/execute/20030125-1.c
Normal file
61
gcc/testsuite/gcc.c-torture/execute/20030125-1.c
Normal file
@ -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;
|
||||
}
|
3
gcc/testsuite/gcc.c-torture/execute/20030125-1.x
Normal file
3
gcc/testsuite/gcc.c-torture/execute/20030125-1.x
Normal file
@ -0,0 +1,3 @@
|
||||
# Only Linux does inlclude all c99 functions at the moment.
|
||||
if { ! [istarget "*linux*"] } { return 1 }
|
||||
return 0
|
Loading…
Reference in New Issue
Block a user