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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [constexpr-static3.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
// Test for constant initialization of class with vtable
2
// { dg-options "-std=c++0x -save-temps" }
3
// { dg-final { scan-assembler-not "static_initialization" } }
4
// { dg-final cleanup-saved-temps }
5
// { dg-do run }
6
 
7
int r = 1;
8
// implicit default constructor for A and B is constexpr
9
struct A { virtual void f() {} };
10
struct B: A { virtual void f() { r = 0; } };
11
 
12
B b;
13
 
14
int main()
15
{
16
  b.f();
17
  return r;
18
}

powered by: WebSVN 2.1.0

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