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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 686 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-O" } */
3
 
4
/* DFP TR 24732 == WG14 / N1176, N1312 */
5
/* Based on a test from Fred Tydeman.  */
6
 
7
#include "dfp-dbg.h"
8
 
9
/* Test runtime computations.  */
10
 
11
void
12
runtime32 (void)
13
{
14
  volatile _Decimal32 d;
15
  d = 0.0DF;
16
  if (d)
17
    FAILURE
18
}
19
 
20
void
21
runtime64 (void)
22
{
23
  volatile _Decimal64 d;
24
  d = 0.0DD;
25
  if (d)
26
    FAILURE
27
}
28
 
29
void
30
runtime128 (void)
31
{
32
  volatile _Decimal128 d;
33
  d = 0.0DL;
34
  if (d)
35
    FAILURE
36
}
37
 
38
void
39
fold32 (void)
40
{
41
  if (0.0DF)
42
    FAILURE
43
}
44
 
45
void
46
fold64 (void)
47
{
48
  if (0.0DD)
49
    FAILURE
50
}
51
 
52
void
53
fold128 (void)
54
{
55
  if (0.0DL)
56
    FAILURE
57
}
58
 
59
int
60
main(void)
61
{
62
  runtime32 ();
63
  runtime64 ();
64
  runtime128 ();
65
 
66
  fold32 ();
67
  fold64 ();
68
  fold128 ();
69
 
70
  FINISH
71
}

powered by: WebSVN 2.1.0

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