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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [c-c++-common/] [dfp/] [pr31385.c] - Blame information for rev 686

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 686 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
 
4
typedef float fp_t __attribute__((mode(SD)));
5
 
6
extern fp_t g(fp_t);
7
 
8
fp_t
9
bug(fp_t x)
10
{
11
    fp_t result;
12
    int n;
13
    fp_t f, f3, y, z;
14
 
15
    n = 0;
16
    y = 1.DF;
17
    f = g(x);
18
 
19
    if (f < 0.DF)
20
        f = -f;
21
 
22
    f3 = 2.DF;
23
 
24
    z = (y + y + f / (y * y));
25
    y = (z + z) / (9.DF) + f3 / (z * z);
26
 
27
    result = y;
28
 
29
    return (result);
30
}

powered by: WebSVN 2.1.0

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