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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [funcorder.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -funit-at-a-time" } */
3
/* { dg-final { scan-assembler-not "link_error" } } */
4
/*  In unit-at-time the functions should be assembled in order
5
    e q t main, so we realize that they are pure.  */
6
 
7
static int mem;
8
static int e(void) __attribute__ ((noinline));
9
static int q(void) __attribute__ ((noinline));
10
static int t(void) __attribute__ ((noinline));
11
main()
12
{
13
        return t();
14
}
15
static t()
16
{
17
        int r,e;
18
        if (mem)
19
                t();
20
        e=mem;
21
        r=q();
22
        if (e!=mem)
23
                link_error();
24
        return r;
25
}
26
static int e()
27
{
28
        return 0;
29
}
30
static int q()
31
{
32
        int t=mem,r;
33
        r=e();
34
        if (t!=mem)
35
                link_error();
36
        return r;
37
}

powered by: WebSVN 2.1.0

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