summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/copy2.C
blob: 40ed576af19a102311b5b63ecdcd7a058b213127 (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
35
// { dg-do assemble  }
// GROUPS passed copy-ctors
// copy file
// From: Vivek Khera <khera@cs.duke.edu>
// Date:     Mon, 15 Nov 1993 16:02:18 -0500
// Subject:  g++ 2.5.3 fails to automatically generate default initializer
// Message-ID: <9311152102.AA21248@thneed.cs.duke.edu>

class String
{
  private:
    char a[100];
    int len;
  public:
    String();
};

String::String()
{
    len = 0;
}


struct List
{
    String item[100];
    int num_items;
//    List();                   // uncomment this line to let compile work
};

int
main(int argc, char **argv)
{
    List a;
}