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/] [structopt-2.c] - Blame information for rev 826

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -fdump-tree-optimized -fno-tree-sra" } */
3
 
4
/* Even without SRA being enabled, we should be able to eliminate every structure store and load here. */
5
extern void foo (const int);
6
int main(void)
7
{
8
        struct a
9
        {
10
                int e;
11
                int f;
12
                int g;
13
        }  a;
14
        struct a b;
15
        int x, c;
16
        a.e = 50;
17
        a.f = 9;
18
        a.g = a.e * a.f;
19
        foo (a.f);
20
        foo (a.g);
21
        x = a.f;
22
        c = a.e;
23
        foo (x);
24
        foo (c);
25
        a.e = 5;
26
        a.f = 40;
27
        a.g = 90;
28
        foo (a.e);
29
        foo (a.f);
30
        foo (a.g);
31
        c = a.f;
32
        foo (c);
33
        b.e = 9;
34
        a.e = b.e + 1 * c;
35
        a.f = 30;
36
        foo (a.e);
37
        foo (a.f);
38
        x = a.e * a.f;
39
        foo (x);
40
 
41
}
42
/* { dg-final { scan-tree-dump-times "a.e" 0 "optimized" } } */
43
/* { dg-final { scan-tree-dump-times "a.f" 0 "optimized" } } */
44
/* { dg-final { scan-tree-dump-times "a.g" 0 "optimized" } } */
45
/* { dg-final { scan-tree-dump-times "b.e" 0 "optimized" } } */
46
/* { dg-final { cleanup-tree-dump "optimized" } } */

powered by: WebSVN 2.1.0

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