OSDN Git Service

Add missing test from last commit
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / tree-ssa / pr22279.C
1 /* { dg-do compile } */
2 /* { dg-options "-O2" } */
3
4 struct string
5 {
6   long long _M_p;
7   long long i;
8   string();
9   int begin();
10   int end();
11   string(int, int);
12 };
13 struct symbol
14 {
15   int type;
16   string name;
17   long long raw_name;
18   long long demangled_name;
19   long long version_name;
20   int version_status;
21   int status;
22   void init();
23 };
24 void symbol::init() { name = string(); }
25 struct pair
26 {
27   symbol first;
28   symbol second;
29   pair(const symbol& __a, const symbol& __b) : first(__a), second(__b) { }
30 };
31 struct vector
32 {
33   void push_back(const pair& __x);
34 };
35 /* This ends up with two RHS deref copies, and we need to get the offsets right on them.  */
36 void f(vector incompatible)
37 {
38   symbol base;
39   incompatible.push_back(pair(base, base));
40 }
41
42
43