20000127-1.c: New test.

* compile/20000127-1.c: New test.
	* execute/991228-1.c: New test.

From-SVN: r31667
This commit is contained in:
Jakub Jelinek 2000-01-28 12:54:37 +01:00 committed by Jakub Jelinek
parent dfe50efb43
commit 73565a7129
3 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2000-01-27 Jakub Jelinek <jakub@redhat.com>
* compile/20000127-1.c: New test.
* execute/991228-1.c: New test.
1999-12-27 Martin von Löwis <loewis@informatik.hu-berlin.de>
* execute/991227-1.c: New test.

View File

@ -0,0 +1,7 @@
double bar(void), c;
int foo(void) {
double a, b;
int i = bar() + bar();
a = i; i += 1; a += 0.1; i = c + i;
return i;
}

View File

@ -0,0 +1,19 @@
__extension__ union { double d; int i[2]; } u = { d: -0.25 };
int
signbit(double x)
{
__extension__ union { double d; int i[2]; } u = { d: x };
return u.i[0] < 0;
}
int main(void)
{
if (2*sizeof(int) != sizeof(double) || u.i[0] >= 0)
exit(0);
if (!signbit(-0.25))
abort();
exit(0);
}