aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/tree-ssa/ssa-dom.C
blob: 5f63865c1665e3da7d7b72ae86555fb8912fca62 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dom1" } */

typedef long unsigned int size_t;
extern void abort (void) __attribute__ ((__noreturn__));
union tree_node;
typedef union tree_node *tree;
union gimple_statement_d;
typedef union gimple_statement_d *gimple;
typedef const union gimple_statement_d *const_gimple;

enum gimple_code
{
  GIMPLE_RETURN = 10,
};





struct gimple_statement_base
{


  enum gimple_code code:8;
};


enum gimple_statement_structure_enum
{
  xyz
};






union gimple_statement_d
{
  struct gimple_statement_base gsbase;
};





extern size_t const gimple_ops_offset_[];


extern enum gimple_statement_structure_enum const gss_for_code_[];


static inline enum gimple_code
gimple_code (const_gimple g)
{
  return g->gsbase.code;
}




static inline enum gimple_statement_structure_enum
gss_for_code (enum gimple_code code)
{
  return gss_for_code_[code];
}




static inline enum gimple_statement_structure_enum
gimple_statement_structure (gimple gs)
{
  return gss_for_code (gimple_code (gs));
}


static inline tree *
gimple_ops (gimple gs)
{
  size_t off;
  off = gimple_ops_offset_[gimple_statement_structure (gs)];
  return (tree *) ((char *) gs + off);
}


static inline void
gimple_set_op (gimple gs, unsigned i, tree op)
{
  gimple_ops (gs)[i] = op;
}

void
gimple_return_set_retval (gimple gs, tree retval)
{
  const_gimple __gs = (gs);
  if (gimple_code (__gs) != (GIMPLE_RETURN))
    abort ();
  gimple_set_op (gs, 0, retval);
}
/* { dg-final { scan-tree-dump-times "gss_for_code_.10." 1 "dom1"} } */
/* { dg-final { cleanup-tree-dump "dom1" } } */