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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fno-tree-sra -fdump-tree-fre1-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" "fre1" } } */
33
/* { dg-final { scan-tree-dump "Replaced b1.D.\[0-9\]*.i with 0" "fre1" } } */
34
/* { dg-final { scan-tree-dump "Replaced b1.D.\[0-9\]*.f with 1" "fre1" } } */
35
/* { dg-final { cleanup-tree-dump "fre1" } } */

powered by: WebSVN 2.1.0

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