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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [tree-prof/] [inline_mismatch_args.C] - Blame information for rev 779

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-options "-O2 -fdump-tree-einline2" } */
2
class DocId {
3
 public:
4
 DocId() { }
5
 DocId(const DocId &other) {  }
6
};
7
 
8
int g;
9
class Base {
10
 public:
11
 virtual void Foo(DocId id) { g++; }
12
};
13
 
14
class Super: public Base {
15
 public:
16
 void Foo(DocId id) { }
17
 void Bar(Base *base, DocId id) __attribute__((noinline));
18
};
19
 
20
void Super::Bar(Base *base, DocId id) {
21
 Super::Foo(id); // direct call is inlined
22
 base->Foo(id); // indirect call is marked do not inline
23
}
24
 
25
int main(void)
26
{
27
 Base bah;
28
 Super baz;
29
 DocId gid;
30
 
31
 baz.Bar(&baz, gid);
32
 return 0;
33
}
34
/* { dg-final-use { scan-tree-dump "Inlining .*Super::Foo" "einline2"} } */
35
/* { dg-final-use { scan-tree-dump-not "mismatched arguments" "einline2"} } */
36
/* { dg-final-use { cleanup-tree-dump "einline2" } } */

powered by: WebSVN 2.1.0

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