Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ipa/remref-1.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Verify that indirect-inlining induced removal of referenes will not remove too many references in presence of speculative devirtualization. */ /* { dg-do link } */ /* { dg-options "-O3 -fno-early-inlining" } */ class A { public: virtual void foo(void (*)(void)); }; static void b(void) { } void A::foo(void (*back)(void)) { back(); } class A *a; void __attribute__ ((noinline, noclone)) allocate_a () { a = new A(); } int main() { allocate_a(); for (int i=0; i<10000;i++) a->foo(b); }