* g++.dg/abi/layout3.C: New test.
From-SVN: r63856
This commit is contained in:
parent
0530d3b00b
commit
1c442892b3
@ -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
|
||||
|
26
gcc/testsuite/g++.dg/abi/layout3.C
Normal file
26
gcc/testsuite/g++.dg/abi/layout3.C
Normal 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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user