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/] [loop-index.c] - Blame information for rev 816

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-options "-std=gnu99" } */
2
 
3
/* C99 6.8.5.2: The for statement.  */
4
 
5
#include <stdio.h>
6
#include <stdlib.h>
7
 
8
void
9
f32 (void)
10
{
11
  _Decimal32 d;
12
  int i;
13
 
14
  for (d = 1.1df, i=0; d <= 1.5df; d += 0.1df)
15
    i++;
16
 
17
  if (i != 5)
18
    abort();
19
}
20
 
21
void
22
f64 (void)
23
{
24
  _Decimal64 d;
25
  int i;
26
 
27
  for (d = 1.1dd, i=0; d <= 1.5dd; d += 0.1dd)
28
    i++;
29
 
30
  if (i != 5)
31
    abort();
32
}
33
 
34
void
35
f128 (void)
36
{
37
  _Decimal128 d;
38
  int i;
39
 
40
  for (d = 1.1dl, i=0; d <= 1.5dl; d += 0.1dl)
41
    i++;
42
 
43
  if (i != 5)
44
    abort();
45
}
46
 
47
int
48
main ()
49
{
50
  int i;
51
 
52
  f32 ();
53
  f64 ();
54
  f128 ();
55
 
56
  return (0);
57
}

powered by: WebSVN 2.1.0

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