* g++.dg/abi/layout3.C: New test.

From-SVN: r63856
This commit is contained in:
Mark Mitchell 2003-03-05 20:52:53 +00:00 committed by Mark Mitchell
parent 0530d3b00b
commit 1c442892b3
2 changed files with 30 additions and 0 deletions

View File

@ -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

View File

@ -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;
}