diff options
author | Jakub Jelinek <jakub@redhat.com> | 2000-01-28 12:54:37 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2000-01-28 12:54:37 +0100 |
commit | 73565a7129b32a8b2e3e463c4e8595b499a75de5 (patch) | |
tree | 2726bdfe082ad30b880c46320e7f9c12df48b3fb | |
parent | dfe50efb43c5e5ac48d03f70c3e7d9fcfde37223 (diff) | |
download | gcc-73565a7129b32a8b2e3e463c4e8595b499a75de5.zip gcc-73565a7129b32a8b2e3e463c4e8595b499a75de5.tar.gz gcc-73565a7129b32a8b2e3e463c4e8595b499a75de5.tar.bz2 |
20000127-1.c: New test.
* compile/20000127-1.c: New test.
* execute/991228-1.c: New test.
From-SVN: r31667
-rw-r--r-- | gcc/testsuite/gcc.c-torture/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/compile/20000127-1.c | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/991228-1.c | 19 |
3 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog index b49506c..86fac2e 100644 --- a/gcc/testsuite/gcc.c-torture/ChangeLog +++ b/gcc/testsuite/gcc.c-torture/ChangeLog @@ -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. diff --git a/gcc/testsuite/gcc.c-torture/compile/20000127-1.c b/gcc/testsuite/gcc.c-torture/compile/20000127-1.c new file mode 100644 index 0000000..34b173c --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20000127-1.c @@ -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; +} diff --git a/gcc/testsuite/gcc.c-torture/execute/991228-1.c b/gcc/testsuite/gcc.c-torture/execute/991228-1.c new file mode 100644 index 0000000..31350eb --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/991228-1.c @@ -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); +} |