Add an UNSPEC_PROLOGUE_USE to prevent the link register from being considered dead.
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.law / code-gen2.C
blob88dd13fd7ef0cd88968c5aade7c2fa0d2091d97d
1 // GROUPS passed code-generation
2 // code-gen file
3 // From: Gunther Seitz <Gunther.Seitz@regent.e-technik.tu-muenchen.dbp.de>
4 // Date:     Thu, 18 Mar 1993 10:45:29 +0100
5 // Message-ID: <93Mar18.104538met.1094@regatta.regent.e-technik.tu-muenchen.de>
8 #include <stdio.h>
10 class X {
12 public:
13     double x;
14     X () { x=3.5; }    // Here we go. This assignment fails because
15                        // of X::x being aligned on a doubleword
16                        // boundary, not a quadword one.
17     };
20 class A : public virtual X {};       // Only way to produce the
21 class B : public virtual X {};       // error is to use this
22 class C : public virtual X {};       // construct of virtual
23                                      // base classes.
25 class Y : public A, public B, public C {};
28 int main ()
30         Y y;       // To call the constructor
31         printf ("PASS\n");
32         }