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] - Diff between revs 301 and 338

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 338
// Testcase for mangling of unnamed types.
// Testcase for mangling of unnamed types.
// namespace-scope unnamed types have no linkage, so we only test that they
// namespace-scope unnamed types have no linkage, so we only test that they
// are distinct.
// are distinct.
// { dg-options -std=c++0x }
// { dg-options -std=c++0x }
typedef struct { } *A;
typedef struct { } *A;
typedef struct { } *B;
typedef struct { } *B;
void f(A) { }
void f(A) { }
void f(B) { }
void f(B) { }
struct C
struct C
{
{
  typedef struct { }* D;
  typedef struct { }* D;
  typedef enum { }* E;
  typedef enum { }* E;
};
};
// { dg-final { scan-assembler "_Z2g1PN1CUt_E" } }
// { dg-final { scan-assembler "_Z2g1PN1CUt_E" } }
void g1(C::D) { }
void g1(C::D) { }
// { dg-final { scan-assembler "_Z2g2PN1CUt0_E" } }
// { dg-final { scan-assembler "_Z2g2PN1CUt0_E" } }
void g2(C::E) { }
void g2(C::E) { }
template 
template 
void h1(T t) { }
void h1(T t) { }
template 
template 
void h2(T t) { }
void h2(T t) { }
inline void j()
inline void j()
{
{
  typedef enum { }* F;
  typedef enum { }* F;
// { dg-final { scan-assembler "_Z2h1IPZ1jvEUt_EvT_" } }
// { dg-final { scan-assembler "_Z2h1IPZ1jvEUt_EvT_" } }
  h1(F());
  h1(F());
  typedef struct { }* G;
  typedef struct { }* G;
// { dg-final { scan-assembler "_Z2h2IPZ1jvEUt0_EvT_" } }
// { dg-final { scan-assembler "_Z2h2IPZ1jvEUt0_EvT_" } }
  h2(G());
  h2(G());
}
}
int main()
int main()
{
{
  j();
  j();
}
}
 
 

powered by: WebSVN 2.1.0

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