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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [inf-1.c] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-std=gnu99" } */
2
 
3
/* N1150 4: Characteristics of decimal floating types (not explicit)
4
   C99 5.2.4.2.2: Characteristics of floating types.
5
   A few simple checks on arithmetic operations. */
6
 
7
extern void abort (void);
8
 
9
int main()
10
{
11
  /* Assumes rounding mode. */
12
  if (9999999.E90DF + 1.E90df != __builtin_infd32 ())
13
    abort ();
14
 
15
  if (!__builtin_isinfd32 (9999999.E90DF + 1.E90df))
16
    abort ();
17
 
18
  if (9.999999999999999E384dd + .000000000000001e384dd
19
      != __builtin_infd32 ())
20
    abort ();
21
 
22
  if (-9999999.E90DF - 1.E90df != -__builtin_infd32 ())
23
    abort ();
24
 
25
  if (!__builtin_isinfd32 (9.999999999999999E384dd + .000000000000001e384dd))
26
    abort ();
27
 
28
  if (7.999999999999999999999999999999999E6144dl + 3.0E6144dl
29
      != __builtin_infd32 ())
30
    abort ();
31
 
32
  if (__builtin_infd32 () * __builtin_infd32 () != __builtin_infd32 ())
33
    abort ();
34
 
35
  if (__builtin_infd32 () * 2 != __builtin_infd32 ())
36
    abort ();
37
 
38
  if (__builtin_infd64 () * -5 != -__builtin_infd32 ())
39
    abort ();
40
 
41
  if (!__builtin_isinfd128 (__builtin_infd32 () / 4))
42
    abort ();
43
 
44
  if (__builtin_infd64 () != __builtin_infd128 ())
45
    abort ();
46
 
47
  if (!__builtin_isinfd64 (__builtin_infd128 ()))
48
    abort ();
49
 
50
  if (__builtin_finited64 (__builtin_infd32 () * 4))
51
    abort ();
52
 
53
  if (!__builtin_finited128 (9.999999E90DL - 1.E90dd))
54
    abort ();
55
 
56
  if (__builtin_finited128 (__builtin_infd32 () *__builtin_infd128 ()))
57
    abort ();
58
 
59
  if (__builtin_finited32 (__builtin_nand32 ("")))
60
    abort ();
61
 
62
  return 0;
63
}

powered by: WebSVN 2.1.0

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