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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do run } */
2
 
3
extern "C" void abort (void);
4
inline void *operator new (__SIZE_TYPE__, void *__p) throw () { return __p; }
5
 
6
int __attribute__((noinline))
7
foo(void)
8
{
9
  float f = 0;
10
  int *i = new (&f) int (1);
11
  return *(int *)&f;
12
}
13
 
14
int main()
15
{
16
  if (foo() != 1)
17
    abort ();
18
  return 0;
19
}

powered by: WebSVN 2.1.0

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