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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [funcorder.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2 -funit-at-a-time" } */
3
/* { dg-final { if [ istarget hppa*-*-* ] { scan-assembler-not "link_error,%r" { xfail hppa*64*-*-* } } else { 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.  The test is
6
    xfailed on hppa64 because variable r in q is sign extended
7
    to 64-bits.  As a result, "if (t!=mem)" is not simplified.  */
8
 
9
static int mem;
10
static int e(void) __attribute__ ((noinline));
11
static int q(void) __attribute__ ((noinline));
12
static int t(void) __attribute__ ((noinline));
13
main()
14
{
15
        return t();
16
}
17
static t()
18
{
19
        int r,e;
20
        if (mem)
21
                t();
22
        e=mem;
23
        r=q();
24
        if (e!=mem)
25
                link_error();
26
        return r;
27
}
28
static int e()
29
{
30
        return 0;
31
}
32
static int q()
33
{
34
        int t=mem,r;
35
        r=e();
36
        if (t!=mem)
37
                link_error();
38
        return r;
39
}

powered by: WebSVN 2.1.0

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