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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [pr47392.c] - Blame information for rev 749

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
3
 
4
struct A
5
{
6
  int i;
7
};
8
 
9
struct B
10
{
11
  struct A a[2];
12
};
13
 
14
int i = 1;
15
struct B b = { 0, 3 };
16
 
17
void
18
test ()
19
{
20
  if (b.a[0].i != i)
21
    {
22
      int t = b.a[0].i;
23
      b.a[0] = b.a[1];
24
      b.a[1].i = t;
25
    }
26
 
27
  if (b.a[1].i == i)
28
    __builtin_abort ();
29
 
30
  if (b.a[0].i == 0)
31
    __builtin_abort ();
32
}
33
 
34
int
35
main ()
36
{
37
  test ();
38
  return 0;
39
}
40
 
41
/* { dg-final { scan-tree-dump "Eliminated: 1" "pre" } } */
42
/* { dg-final { cleanup-tree-dump "pre" } } */

powered by: WebSVN 2.1.0

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