PR middle-end/83718
* tree-inline.c (copy_cfg_body): Adjust num&den for scaling
after they are computed.
* g++.dg/torture/pr83718.C: New testcase.
From-SVN: r256544
+2018-01-11 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/83718
+ * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
+ after they are computed.
+
2018-01-11 Bin Cheng <bin.cheng@arm.com>
PR tree-optimization/83695
+2018-01-11 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/83718
+ * g++.dg/torture/pr83718.C: New testcase.
+
2018-01-11 Martin Jambor <mjambor@suse.cz>
PR ipa/83178
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -std=c++11" } */
+
+class a
+{
+public:
+ int c (const char *);
+};
+class B
+{
+ virtual int *d (a, bool);
+};
+
+bool e, f, g;
+
+class: B
+{
+ int ah;
+ int *
+ d (a, bool)
+ {
+ if (e)
+ return &ah;
+ a bj;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (f)
+ return &ah;
+ bj.c ("");
+ if (g)
+ return &ah;
+ if (f)
+ return &ah;
+ e = a ().c("");
+ return &ah;
+ }
+} b;
+
profile_count den = ENTRY_BLOCK_PTR_FOR_FN (src_cfun)->count;
profile_count num = entry_block_map->count;
- profile_count::adjust_for_ipa_scaling (&num, &den);
-
cfun_to_copy = id->src_cfun = DECL_STRUCT_FUNCTION (callee_fndecl);
/* Register specific tree functions. */
ENTRY_BLOCK_PTR_FOR_FN (cfun)->count = den;
}
+ profile_count::adjust_for_ipa_scaling (&num, &den);
+
/* Must have a CFG here at this point. */
gcc_assert (ENTRY_BLOCK_PTR_FOR_FN
(DECL_STRUCT_FUNCTION (callee_fndecl)));