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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [lto/] [20090221_0.C] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// { dg-lto-do assemble }
2
extern void some_function (const char *);
3
extern bool some_other_function ();
4
 
5
struct Foo
6
{
7
 long long a;
8
 int b;
9
};
10
 
11
bool Foo_eq(Foo x, Foo y)
12
{
13
 return x.a == y.a && x.b == y.b;
14
}
15
 
16
struct Bar
17
{
18
 Foo a;
19
 int b;
20
};
21
 
22
struct Baz
23
{
24
 Bar a;
25
 Baz(Bar &a):a(a) { }
26
};
27
 
28
struct Zonk
29
{
30
 Baz baz;
31
 
32
 Bar func_1(const Bar & bar) {
33
   if (Foo_eq(bar.a, baz.a.a) && bar.b == baz.a.b || some_other_function ())
34
     return bar;
35
 }
36
 
37
 void func_2(const Baz & baz) {
38
   func_1(baz.a);
39
   some_function(__PRETTY_FUNCTION__);
40
 }
41
};
42
 
43
void func() {
44
 Bar bar;
45
 Zonk *rep;
46
 rep->func_1(bar);
47
 rep->func_2(Baz(bar));
48
}
49
 
50
void foo ()
51
{
52
  func();
53
}

powered by: WebSVN 2.1.0

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