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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr38747.C] - Blame information for rev 320

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

Line No. Rev Author Line
1 301 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.