aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C
blob: a9ee807631fa504d3a7d615e8c2f1732a03b8c2a (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
// { dg-do compile }
// { dg-options "-fno-ipa-sra -fcompare-debug" }
// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }

struct comp_cost { int cost; unsigned complexity; };
struct cost_pair { struct iv_cand *cand; };
struct iv_use { unsigned n_map_members; cost_pair *cost_map; };
struct iv_cand { unsigned id; };

unsigned gu;

void
bar (comp_cost, comp_cost)
{
}

void
foo (iv_use *use, iv_cand *cand)
{
  unsigned i, s = cand->id & (use->n_map_members - 1);
  for (i = 0; i < s; i++)
    if (use->cost_map[i].cand)
      goto found;
found:
  use->cost_map[i].cand = cand;
  comp_cost elim_cost, express_cost, bound_cost;
  bar (elim_cost, express_cost);
  gu = express_cost.complexity;
}