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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [dfp/] [operator-arith-fold.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-std=gnu99 -O" } */
2
 
3
/* C99 6.5.5: Multiplicative operators.
4
   C99 6.5.6: Additive operators.  */
5
 
6
extern void link_error (void);
7
 
8
int
9
main ()
10
{
11
  _Decimal32 d32_1, d32_2;
12
 
13
  /* Compare like-typed positive constants. */
14
  if (2.99df + 5.1df != 8.09df)
15
    link_error ();
16
 
17
  if (5.77df - 2.22dd != 3.55df)
18
    link_error ();
19
 
20
  if (2.0dl * 3.7dd * -2 != -14.8df)
21
    link_error ();
22
 
23
  if (.18df / -.2df + 1 != 1.e-1dd)
24
    link_error ();
25
 
26
  d32_1 = 3.0df;
27
  d32_2 = 1.0df;
28
 
29
  if (!__builtin_constant_p (d32_1 + 0.2df))
30
    link_error ();
31
 
32
  if (!__builtin_constant_p (1.0df / 3.0df))
33
    link_error ();
34
 
35
  if (!__builtin_constant_p (d32_2 / d32_1))
36
    link_error ();
37
 
38
  d32_2 = 2.0df;
39
  if (!__builtin_constant_p (d32_2 / d32_1))
40
    link_error ();
41
 
42
  return 0;
43
}

powered by: WebSVN 2.1.0

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