OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [ipa/] [devirt-g-1.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do compile }
2
// { dg-options "-O2 -fdump-ipa-cp -fdump-tree-optimized" }
3
 
4
struct S { S(); virtual void xyzzy(); void otherstuff(); };
5
struct R { int a; S s; R(); };
6
S s;
7
R r;
8
 
9
void S::xyzzy ()
10
{
11
  otherstuff ();
12
  otherstuff ();
13
}
14
 
15
static void __attribute__ ((noinline)) foo(S *p) { p->xyzzy(); }
16
void bar() {foo(&s); }
17
 
18
static void __attribute__ ((noinline)) foh(S *p) { p->xyzzy(); }
19
void bah() {foh(&r.s); }
20
 
21
/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target.*S::xyzzy" "cp"  } } */
22
/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "optimized"} } */
23
/* { dg-final { cleanup-ipa-dump "cp" } } */
24
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.