aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C')
-rw-r--r--gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C b/gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C
new file mode 100644
index 000000000..a9ee80763
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/g++.dg/debug/pr56294.C
@@ -0,0 +1,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;
+}
+
+