Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/g++.dg/ipa/remref-1.C @ 145:1830386684a0
gcc-9.2.0
author | anatofuz |
---|---|
date | Thu, 13 Feb 2020 11:34:05 +0900 |
parents | 84e7813d76e9 |
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); }