Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.law/code-gen2.C

raw
1 // { dg-do run }
2 // GROUPS passed code-generation
3 // code-gen file
4 // From: Gunther Seitz <[email protected]>
5 // Date: Thu, 18 Mar 1993 10:45:29 +0100
6 // Message-ID: <[email protected]>
7
8
9 #include <stdio.h>
10
11 class X {
12
13 public:
14 double x;
15 X () { x=3.5; } // Here we go. This assignment fails because
16 // of X::x being aligned on a doubleword
17 // boundary, not a quadword one.
18 };
19
20
21 class A : public virtual X {}; // Only way to produce the
22 class B : public virtual X {}; // error is to use this
23 class C : public virtual X {}; // construct of virtual
24 // base classes.
25
26 class Y : public A, public B, public C {};
27
28
29 int main ()
30 {
31 Y y; // To call the constructor
32 printf ("PASS\n");
33 }
34
35