d: Fix gdc -O2 -mavx generates misaligned vmovdqa instruction [PR114171]
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.brendan / copy9.C
blob79339c13de9d7afd679f0179ae60ea7f30b8a1a8
1 // { dg-do run  }
2 // { dg-additional-options "-fexcess-precision=fast" }
3 // GROUPS passed copy-ctors
4 #include <iostream>
6 // token types: from state parser
7 const int T_EOF = 257;
8 const int T_ERROR = 258;
9 const int T_Float = 259;
10 const int T_Int = 260;
11 const int T_ID = 261;
12 const int T_STRING = 262;
14 class Complex;
15 class State;
17 // token, from state parser.
18 class ParseToken {
19 public:
20         int tok;
21         union {
22                 char cval;
23                 const char *sval;
24                 int intval;
25                 double  doubleval;
26                 Complex* Complexval;
27                 const State*  s;
28         }; 
29         ParseToken () { tok = 0; intval = 0;}
32 int
33 main () {
34         ParseToken a;
35         a.tok = T_Float;
36         a.doubleval = 23.2;
37         ParseToken b(a);
39         if (b.doubleval == 23.2)
40           std::cout << "PASS\n";
41         else
42           {
43             std::cout << "FAIL\n";
44             return 1;
45           }