diff options
author | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-06 23:15:05 +0000 |
---|---|---|
committer | aoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-06 23:15:05 +0000 |
commit | 98bde8c72336b94408ff863750e72ccd63824bc8 (patch) | |
tree | 77901f241db86d612e062cc9ed860990398b9064 /gcc | |
parent | 8a4c0d5c3861536f8600ddea9531470997d54e08 (diff) | |
download | gcc-98bde8c72336b94408ff863750e72ccd63824bc8.tar.gz |
* gcc.c-torture/execute/20010106-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38753 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/20010106-1.c | 30 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2ca4f175884..e8051c87239 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-01-06 Alexandre Oliva <aoliva@redhat.com> + + * gcc.c-torture/execute/20010106-1.c: New test. + 2001-01-06 Joseph S. Myers <jsm28@cam.ac.uk> * gcc.dg/format/format.exp: New file. diff --git a/gcc/testsuite/gcc.c-torture/execute/20010106-1.c b/gcc/testsuite/gcc.c-torture/execute/20010106-1.c new file mode 100644 index 00000000000..9e149c31462 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20010106-1.c @@ -0,0 +1,30 @@ +/* Copyright 2001 Free Software Foundation + Contributed by Alexandre Oliva <aoliva@redhat.com> */ + +int f(int i) { + switch (i) + { + case -2: + return 33; + case -1: + return 0; + case 0: + return 7; + case 1: + return 4; + case 2: + return 3; + case 3: + return 15; + case 4: + return 9; + default: + abort (); + } +} + +int main() { + if (f(-1)) + abort (); + exit (0); +} |