diff options
author | Mark Mitchell <mark@codesourcery.com> | 2003-03-05 20:52:53 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 2003-03-05 20:52:53 +0000 |
commit | 1c442892b378ded74a8c2207adba332f62a85471 (patch) | |
tree | 8b5c6cd29eede4ae0caf8f81db402e1ff878b393 /gcc | |
parent | 0530d3b00b695924cf8a803983f2eb2ba93d03bc (diff) | |
download | gcc-1c442892b378ded74a8c2207adba332f62a85471.zip gcc-1c442892b378ded74a8c2207adba332f62a85471.tar.gz gcc-1c442892b378ded74a8c2207adba332f62a85471.tar.bz2 |
* g++.dg/abi/layout3.C: New test.
From-SVN: r63856
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/abi/layout3.C | 26 |
2 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0060172..27e0345 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2003-03-05 Mark Mitchell <mark@codesourcery.com> + + * g++.dg/abi/layout3.C: New test. + 2003-03-05 Eric Botcazou <ebotcazou@libertysurf.fr> * gcc.c-torture/compile/20030305-1.c diff --git a/gcc/testsuite/g++.dg/abi/layout3.C b/gcc/testsuite/g++.dg/abi/layout3.C new file mode 100644 index 0000000..6ab6d6b --- /dev/null +++ b/gcc/testsuite/g++.dg/abi/layout3.C @@ -0,0 +1,26 @@ +// { dg-do run { target i?86-*-* } } +// { dg-options "-fabi-version=0 -w" } + +struct S { + virtual void f() {} +}; + +struct T : virtual public S { }; + +struct U : public S, virtual public T { + char c[100]; +}; + +struct V : public U, virtual public S {}; + +struct W : public V { + int i; +}; + +int main () { + W w; + + if ((char*) &w.i - (char *) &w != 104) + return 1; +} + |