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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [debug/] [debug1.C] - Blame information for rev 801

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

Line No. Rev Author Line
1 693 jeremybenn
// Test whether dwarf2 debug info works with named return value optimization
2
// { dg-do compile }
3
 
4
struct S
5
{
6
  virtual ~S();
7
  S (const char *str);
8
  S& operator= (const char *str);
9
  operator const char *() const;
10
  S& operator+= (const char *str);
11
};
12
inline S operator+ (const char *s1, const S &s2)
13
{
14
  S x (s1);
15
  x += s2;
16
  return x;
17
}
18
struct U
19
{
20
  U ();
21
  U& operator= (const char *);
22
  const char *foo() const;
23
  operator const char *() const { return foo(); }
24
};
25
template  struct V
26
{
27
  T v;
28
};
29
template  struct W
30
{
31
  V *w;
32
  W() : w (0) {}
33
  const T& operator* () const { return w->v; }
34
  T& operator* () { return w->v; }
35
};
36
struct X {
37
  X();
38
};
39
struct Y {
40
  Y (const U &u);
41
};
42
X::X()
43
{
44
  W a;
45
  U b;
46
  b = (*a) + "xx";
47
  Y c (b);
48
}

powered by: WebSVN 2.1.0

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