libstdc++: Only define std::span::at for C++26 [PR115335]
[official-gcc.git] / gcc / testsuite / g++.dg / debug / pr56294.C
blobd31ed1cb73e9c22ef85013e56eb4bae915685fa3
1 // { dg-do compile }
2 // { dg-options "-fno-ipa-sra -fcompare-debug" }
3 // { dg-xfail-if "AIX compare debug" { powerpc-ibm-aix* } }
5 struct comp_cost { int cost; unsigned complexity; };
6 struct cost_pair { struct iv_cand *cand; };
7 struct iv_use { unsigned n_map_members; cost_pair *cost_map; };
8 struct iv_cand { unsigned id; };
10 unsigned gu;
12 void
13 bar (comp_cost, comp_cost)
17 void
18 foo (iv_use *use, iv_cand *cand)
20   unsigned i, s = cand->id & (use->n_map_members - 1);
21   for (i = 0; i < s; i++)
22     if (use->cost_map[i].cand)
23       goto found;
24 found:
25   use->cost_map[i].cand = cand;
26   comp_cost elim_cost, express_cost, bound_cost;
27   bar (elim_cost, express_cost);
28   gu = express_cost.complexity;