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/] [pr23109.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 -funsafe-math-optimizations -ftrapping-math -fdump-tree-recip -fdump-tree-lim" } */
3
/* { dg-warning "-fassociative-math disabled" "" { target *-*-* } 1 } */
4
 
5
double F[2] = { 0., 0. }, e = 0.;
6
 
7
int main()
8
{
9
        int i;
10
        double E, W, P, d;
11
 
12
        /* make sure the program crashes on FP exception */
13
        unsigned short int Mask;
14
 
15
        W = 1.;
16
        d = 2.*e;
17
        E = 1. - d;
18
 
19
        for( i=0; i < 2; i++ )
20
                if( d > 0.01 )
21
                {
22
                        P = ( W < E ) ? (W - E)/d : (E - W)/d;
23
                        F[i] += P;
24
                }
25
 
26
        return 0;
27
}
28
 
29
/* LIM only performs the transformation in the no-trapping-math case.  In
30
   the future we will do it for trapping-math as well in recip, check that
31
   this is not wrongly optimized.  */
32
/* { dg-final { scan-tree-dump-not "reciptmp" "lim1" } } */
33
/* { dg-final { scan-tree-dump-not "reciptmp" "recip" } } */
34
/* { dg-final { cleanup-tree-dump "recip" } } */
35
/* { dg-final { cleanup-tree-dump "lim\[1-2\]" } } */
36
 

powered by: WebSVN 2.1.0

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