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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [tree-ssa/] [ssa-ccp-21.c] - Blame information for rev 298

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O -fdump-tree-ccp1" } */
3
 
4
struct A {
5
    struct B {
6
        int i;
7
    } b;
8
} a;
9
 
10
int foo (void)
11
{
12
  struct B *p = &a.b;
13
  struct A *q = (struct A *) p;
14
  return q->b.i;
15
}
16
 
17
int bar (void)
18
{
19
  struct A *p = &a;
20
  struct B *q = (struct B *) p;
21
  return q->i;
22
}
23
 
24
/* { dg-final { scan-tree-dump-times "a.b.i" 2 "ccp1" } } */
25
/* { dg-final { cleanup-tree-dump "ccp1" } } */

powered by: WebSVN 2.1.0

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