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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fdump-tree-fre-details" } */
3
 
4
struct Foo {
5
  Foo() {};
6
  int i;
7
  short f;
8
};
9
struct Bar : public Foo {
10
  Bar() {};
11
  short b;
12
};
13
 
14
extern "C" void abort(void);
15
 
16
int main()
17
{
18
  Bar b1, b2;
19
  b2.i = 0;
20
  b1.f = 0;
21
  b1.b = 1;
22
  b2.f = 1;
23
  b2.b = 2;
24
  static_cast(b1) = static_cast(b2);
25
  if (b1.i != 0 || b1.b != 1)
26
    abort ();
27
  if (b1.f != 1)
28
    abort ();
29
  return 0;
30
}
31
 
32
/* { dg-final { scan-tree-dump "Replaced b1.b with 1" "fre" } } */
33
/* { dg-final { scan-tree-dump "Replaced b1.i with 0" "fre" { xfail *-*-* } } } */
34
/* { dg-final { scan-tree-dump "Replaced b1.f with 1" "fre" { xfail *-*-* } } } */
35
/* { dg-final { cleanup-tree-dump "fre" } } */

powered by: WebSVN 2.1.0

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