diff options
author | Jakub Jelinek <jakub@redhat.com> | 2003-05-16 21:35:43 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2003-05-16 21:35:43 +0200 |
commit | dcac003d6685744f5f95c068b85b051a03567272 (patch) | |
tree | 55b43cff94fa644f169e8d48dff2a04d2d619aed /gcc/testsuite/gcc.dg/20030309-1.c | |
parent | 4a0a75dd441da8834907fc7d78634b458f71ce58 (diff) | |
download | gcc-dcac003d6685744f5f95c068b85b051a03567272.zip gcc-dcac003d6685744f5f95c068b85b051a03567272.tar.gz gcc-dcac003d6685744f5f95c068b85b051a03567272.tar.bz2 |
backport: re PR target/7434 ([x86_64] ICE in change_address_1, at emit-rtl.c:1934)
Merge from gcc-3_2-rhl8-branch:
2003-04-23 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/tls/opt-6.c: New test.
2003-04-05 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20030405-1.c: New test.
2003-03-09 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20030309-1.c: New test.
2003-03-07 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.c-torture/execute/20030307-1.c: New test.
2003-02-20 Randolph Chung <tausq@debian.org>
* gcc.c-torture/compile/20030220-1.c: New test.
2003-02-18 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20030217-1.c: New test.
2003-01-29 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20020129-1.c: New test.
2002-12-21 Eric Botcazou <ebotcazou@libertysurf.fr>
* gcc.dg/unroll-1.c: New test.
2002-11-16 Jan Hubicka <jh@suse.cz>
* gcc.c-torture/execute/20020920-1.c: New test.
2002-10-08 Jakub Jelinek <jakub@redhat.com>
PR target/7434
* gcc.c-torture/compile/20021008-1.c: New test.
2002-08-10 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
PR target/7559
* testsuite/gcc.c-torture/execute/20020810-1.c: New test.
2002-08-07 Jakub Jelinek <jakub@redhat.com>
* gcc.c-torture/compile/20020807-1.c: New test.
2002-07-30 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/tls/opt-1.c: New test.
2002-07-29 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20020729-1.c: New test.
2002-07-20 Jakub Jelinek <jakub@redhat.com>
* g++.dg/opt/life1.C: New test.
2002-05-20 Jakub Jelinek <jakub@redhat.com>
* gcc.dg/20020525-1.c: New test.
2002-05-24 Jakub Jelinek <jakub@redhat.com>
PR c++/6794
* g++.dg/ext/pretty1.C: New test.
* g++.dg/ext/pretty2.C: New test.
From-SVN: r66877
Diffstat (limited to 'gcc/testsuite/gcc.dg/20030309-1.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/20030309-1.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/20030309-1.c b/gcc/testsuite/gcc.dg/20030309-1.c new file mode 100644 index 0000000..2431bc1 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20030309-1.c @@ -0,0 +1,42 @@ +/* { dg-do link } */ +/* { dg-options "-O2" } */ + +struct A0 { int x; }; +struct A1 { int x; int y[1]; }; +struct A2 { int x; int y[2]; }; +struct A3 { int x; int y[3]; }; +struct A4 { int x; int y[4]; }; + +void *s; +int u; + +int +main (void) +{ + int x; + void *t = s; + + switch (u) + { + case 0: + x = ((struct A0 *) t)->x; + break; + case 1: + x = ((struct A1 *) t)->x; + break; + case 2: + x = ((struct A2 *) t)->x; + break; + case 3: + x = ((struct A3 *) t)->x; + break; + case 4: + x = ((struct A4 *) t)->x; + break; + default: + x = 0; + break; + } + + return x; +} |