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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [nsdmi-template1.C] - Blame information for rev 774

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

Line No. Rev Author Line
1 693 jeremybenn
// { dg-do run }
2
// { dg-options -std=c++0x }
3
 
4
struct base
5
{
6
  int calc_avg() { return 42; }
7
};
8
 
9
template  struct nsdmi : T
10
{
11
  nsdmi() {}
12
  int avg() { return avg_; }
13
  int avg_ = this->calc_avg();
14
};
15
 
16
int main()
17
{
18
  nsdmi x;
19
  if (x.avg() != 42)
20
    __builtin_abort();
21
}

powered by: WebSVN 2.1.0

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