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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.benjamin/] [tem06.C] - Blame information for rev 699

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 699 jeremybenn
// { dg-do run  }
2
// 980945 bkoz
3
// test for correct operators at link time
4
 
5
/*
6
/tmp/cca211431.o: In function `void blah >(foo const &)':
7
/tmp/cca211431.o(.void gnu.linkonce.t.blah >(foo const &)+0x1e): undefined reference to `void x(int const &)'
8
*/
9
 
10
template
11
class foo {
12
public:
13
  foo () {}
14
  friend void x (const T &) { }
15
};
16
 
17
void x(const int &);
18
 
19
template
20
void blah (const T &) {
21
  T y;
22
  x (4);
23
}
24
 
25
int main () {
26
  const foo v;
27
  blah (v);
28
}
29
 
30
/*
31
fno-exceptions -fno-rtti
32
 
33
1.98r1.o:
34
00000000 W __t3foo1Zi
35
00000000 W blah__H1Zt3foo1Zi_RCX01_v
36
00000000 t gcc2_compiled.
37
00000000 T main
38
         U x__H1Zi_RCX01_v
39
 
40
1.egcs.o:
41
00000000 W __t3foo1Zi
42
00000000 W blah__H1Zt3foo1Zi_RCX01_v
43
00000000 t gcc2_compiled.
44
00000000 T main
45
00000000 W x__FRCi
46
 
47
 
48
the reason this goes away at -O is because the U or W function is
49
elided completely.
50
 
51
*/
52
 

powered by: WebSVN 2.1.0

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