+2014-09-26 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/35545
+ * passes.def (pass_tracer): Move before last dominator pass.
+
2014-09-26 Thomas Schwinge <thomas@codesourcery.com>
* gcc.c (try_generate_repro): Remove argument "prog". Change all
NEXT_PASS (pass_cse_reciprocals);
NEXT_PASS (pass_reassoc);
NEXT_PASS (pass_strength_reduction);
+ NEXT_PASS (pass_tracer);
NEXT_PASS (pass_dominator);
NEXT_PASS (pass_strlen);
NEXT_PASS (pass_vrp);
opportunities. */
NEXT_PASS (pass_phi_only_cprop);
NEXT_PASS (pass_cd_dce);
- NEXT_PASS (pass_tracer);
NEXT_PASS (pass_dse);
NEXT_PASS (pass_forwprop);
NEXT_PASS (pass_phiopt);
+2014-09-26 Jan Hubicka <hubicka@ucw.cz>
+
+ PR middle-end/35545
+ * g++.dg/tree-prof/pr35545.C: New testcase.
+
2014-09-26 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
* gcc.target/powerpc/pr63335.c: Change effective target to
--- /dev/null
+// devirt.cc
+/* { dg-options "-O2 -fdump-ipa-profile_estimate -fdump-tree-optimized" } */
+
+class A {
+public:
+ virtual int foo() {
+ return 1;
+ }
+
+int i;
+};
+
+class B : public A
+{
+public:
+ virtual int foo() {
+ return 2;
+ }
+
+ int b;
+} ;
+
+
+int main()
+{
+ int i;
+
+ A* ap = 0;
+
+ for (i = 0; i < 10000; i++)
+ {
+
+ if (i%7==0)
+ {
+ ap = new A();
+ }
+ else
+ ap = new B();
+
+ ap->foo();
+
+ delete ap;
+
+ }
+
+ return 0;
+
+}
+/* { dg-final-use { scan-ipa-dump "Indirect call -> direct call" "profile_estimate" } } */
+/* { dg-final-use { cleanup-ipa-dump "profile" } } */
+/* { dg-final-use { scan-ipa-dump-not "OBJ_TYPE_REF" "optimized" } } */
+/* { dg-final-use { cleanup-tree-dump "optimized" } } */