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/] [abi/] [mangle32.C] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Testcase for mangling of unnamed types.
2
 
3
// namespace-scope unnamed types have no linkage, so we only test that they
4
// are distinct.
5
 
6
// { dg-options -std=c++0x }
7
 
8
typedef struct { } *A;
9
typedef struct { } *B;
10
 
11
void f(A) { }
12
void f(B) { }
13
 
14
struct C
15
{
16
  typedef struct { }* D;
17
  typedef enum { }* E;
18
};
19
 
20
// { dg-final { scan-assembler "_Z2g1PN1CUt_E" } }
21
void g1(C::D) { }
22
// { dg-final { scan-assembler "_Z2g2PN1CUt0_E" } }
23
void g2(C::E) { }
24
 
25
template 
26
void h1(T t) { }
27
 
28
template 
29
void h2(T t) { }
30
 
31
inline void j()
32
{
33
  typedef enum { }* F;
34
// { dg-final { scan-assembler "_Z2h1IPZ1jvEUt_EvT_" } }
35
  h1(F());
36
  typedef struct { }* G;
37
// { dg-final { scan-assembler "_Z2h2IPZ1jvEUt0_EvT_" } }
38
  h2(G());
39
}
40
 
41
int main()
42
{
43
  j();
44
}

powered by: WebSVN 2.1.0

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