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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [initlist-value2.C] - Rev 715

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

// Test that we properly value-initialize a class with a user-provided
// constructor but defaulted default constructor.  The FDIS got this
// wrong; see c++std-core-19883.

// { dg-options -std=c++0x }
// { dg-do run }

struct A
{
  int i;
  A() = default;
  A(int);
};

int main()
{
  A a{};
  if (a.i != 0)
    return 1;
}

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

powered by: WebSVN 2.1.0

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