diff options
author | Andreas Jaeger <aj@suse.de> | 2002-10-06 21:30:37 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@gcc.gnu.org> | 2002-10-06 21:30:37 +0200 |
commit | f75369c87a1f5f514b6f2642749c285e1a3d0513 (patch) | |
tree | 0f2879aef5e4b2e136b51cbe4b2e93e39268eccc /gcc | |
parent | de78f58bcf356456bb015282fd844ef0ba81605d (diff) | |
download | gcc-f75369c87a1f5f514b6f2642749c285e1a3d0513.zip gcc-f75369c87a1f5f514b6f2642749c285e1a3d0513.tar.gz gcc-f75369c87a1f5f514b6f2642749c285e1a3d0513.tar.bz2 |
re PR target/7559 (kdelibs miscompilation)
PR target/7559
* gcc.dg/20021006-1.c: New test.
From-SVN: r57867
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/20021006-1.c | 27 |
2 files changed, 34 insertions, 2 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index f5cfa35..32dded3 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2002-10-06 Andreas Jaeger <aj@suse.de> + + PR target/7559 + * gcc.dg/20021006-1.c: New test. + 2002-10-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> PR c++/7804 @@ -13,7 +18,7 @@ PR c++/7931 * g++.dg/template/ptrmem3.C: New test. - + PR c++/7754 * g++.dg/template/union1.C: New test. @@ -71,7 +76,7 @@ * g++.dg/abi/empty7.C: New test. * g++.dg/init/pm2.C: Likewise. - + 2002-09-29 Nathan Sidwell <nathan@codesourcery.com> * g++.dg/rtti/crash1.C: New test. diff --git a/gcc/testsuite/gcc.dg/20021006-1.c b/gcc/testsuite/gcc.dg/20021006-1.c new file mode 100644 index 0000000..63cc8a5 --- /dev/null +++ b/gcc/testsuite/gcc.dg/20021006-1.c @@ -0,0 +1,27 @@ +/* PR target/7559 + This testcase was miscompiled on x86-64 due to wrong access to the struct + members. */ + +extern void abort(); + +struct A { + long x; +}; + +struct R { + struct A a, b; +}; + +struct R R = { + {100}, {200} +}; + +void f(struct R r) { + if (r.a.x != R.a.x || r.b.x != R.b.x) + abort(); +} + +int main() { + f(R); + return 0; +} |