summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tree-ssa/pr22279.C
blob: 0e17f08ecde48698aac6fd61bbae1f54315d8f6c (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
36
37
38
39
40
41
42
43
/* { dg-do compile } */
/* { dg-options "-O2" } */

struct string
{
  long long _M_p;
  long long i;
  string();
  int begin();
  int end();
  string(int, int);
};
struct symbol
{
  int type;
  string name;
  long long raw_name;
  long long demangled_name;
  long long version_name;
  int version_status;
  int status;
  void init();
};
void symbol::init() { name = string(); }
struct pair
{
  symbol first;
  symbol second;
  pair(const symbol& __a, const symbol& __b) : first(__a), second(__b) { }
};
struct vector
{
  void push_back(const pair& __x);
};
/* This ends up with two RHS deref copies, and we need to get the offsets right on them.  */
void f(vector incompatible)
{
  symbol base;
  incompatible.push_back(pair(base, base));
}