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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [abi/] [mangle34.C] - Blame information for rev 693

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// Contributed by Dodji Seketeli 
2
// Origin PR c++/40808
3
// { dg-do compile }
4
// This tests the mangling of empty template argument list in a template
5
// id.
6
// { dg-final { scan-assembler "_ZNK5DummyclI3GenEENT_3SigIE10ResultTypeERKS2_" } }
7
 
8
 
9
struct Void {};
10
 
11
template  struct FunType {
12
  typedef R ResultType;
13
};
14
 
15
struct WrongNumberOfSigArgs {};
16
 
17
template  struct CFunType {
18
  template  struct Sig : public
19
FunType {};
20
  template  struct Sig : public FunType {};
21
};
22
 
23
struct Dummy {
24
  template  typename F::template Sig<>::ResultType operator()(F
25
const& f) const {
26
    return typename F::template Sig<>::ResultType(0);
27
  }
28
};
29
 
30
struct Gen: public CFunType {
31
  int operator()() const {return 0;}
32
  Gen() {}
33
};
34
 
35
int myfunction() {
36
  return Dummy()(Gen());
37
}
38
 
39
int main() {
40
  myfunction();
41
}

powered by: WebSVN 2.1.0

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