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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// PR c++/49216
2
// { dg-options -std=c++0x }
3
// { dg-do run }
4
 
5
#include 
6
extern "C" void abort();
7
void * operator new[] (__SIZE_TYPE__, void *p) { return p; }
8
 
9
bool constructed;
10
 
11
struct A
12
{
13
  A(std::initializer_list) { constructed = true; }
14
};
15
 
16
int main() {
17
  new A[1]{};
18
  int space[1] = { 42 };
19
  int *p = new (space) int[1]{};
20
  if (p[0] != 0 || !constructed)
21
    abort();
22
}

powered by: WebSVN 2.1.0

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