OSDN Git Service

* call.c (add_candidates): Add first_arg and return_type parms.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.brendan / copy9.C
1 // { dg-do run  }
2 // GROUPS passed copy-ctors
3 #include <iostream>
4
5 // token types: from state parser
6 const int T_EOF = 257;
7 const int T_ERROR = 258;
8 const int T_Float = 259;
9 const int T_Int = 260;
10 const int T_ID = 261;
11 const int T_STRING = 262;
12
13 class Complex;
14 class State;
15
16 // token, from state parser.
17 class ParseToken {
18 public:
19         int tok;
20         union {
21                 char cval;
22                 const char *sval;
23                 int intval;
24                 double  doubleval;
25                 Complex* Complexval;
26                 const State*  s;
27         }; 
28         ParseToken () { tok = 0; intval = 0;}
29 };
30
31 int
32 main () {
33         ParseToken a;
34         a.tok = T_Float;
35         a.doubleval = 23.2;
36         ParseToken b(a);
37
38         if (b.doubleval == 23.2)
39           std::cout << "PASS\n";
40         else
41           {
42             std::cout << "FAIL\n";
43             return 1;
44           }
45 }
46