aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/code-gen2.C
blob: 88dd13fd7ef0cd88968c5aade7c2fa0d2091d97d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// GROUPS passed code-generation
// code-gen file
// From: Gunther Seitz <Gunther.Seitz@regent.e-technik.tu-muenchen.dbp.de>
// Date:     Thu, 18 Mar 1993 10:45:29 +0100
// Message-ID: <93Mar18.104538met.1094@regatta.regent.e-technik.tu-muenchen.de>


#include <stdio.h>

class X {

public:
    double x;
    X () { x=3.5; }    // Here we go. This assignment fails because
                       // of X::x being aligned on a doubleword
                       // boundary, not a quadword one.
    };


class A : public virtual X {};       // Only way to produce the
class B : public virtual X {};       // error is to use this
class C : public virtual X {};       // construct of virtual
                                     // base classes.

class Y : public A, public B, public C {};


int main ()
{
        Y y;       // To call the constructor
	printf ("PASS\n");
        }