OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr19637.C] - Blame information for rev 384

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-dom1" } */
3
 
4
#include 
5
 
6
struct Foo {
7
  Foo() { i[0] = 1; }
8
  int i[2];
9
};
10
 
11
int foo_char(void)
12
{
13
  int i[2];
14
  new (reinterpret_cast(i)) Foo();
15
  return reinterpret_cast(i)->i[0];
16
}
17
 
18
int foo_void(void)
19
{
20
  int i[2];
21
  new (reinterpret_cast(i)) Foo();
22
  return reinterpret_cast(i)->i[0];
23
}
24
 
25
int foo_void_offset(void)
26
{
27
  int i[2];
28
  new (reinterpret_cast(&i[0])) Foo();
29
  return reinterpret_cast(&i[0])->i[0];
30
}
31
 
32
/* { dg-final { scan-tree-dump-times "return 1;" 3 "dom1" } } */
33
/* { dg-final { cleanup-tree-dump "dom1" } } */

powered by: WebSVN 2.1.0

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