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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [excess-precision-2.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 318 jeremybenn
/* Excess precision tests.  Test excess precision of constants.  */
2
/* { dg-do run } */
3
/* { dg-options "-O2 -mfpmath=387 -fexcess-precision=standard" } */
4
 
5
#include <float.h>
6
 
7
extern void abort (void);
8
extern void exit (int);
9
 
10
volatile long double ldadd1 = 1.0l + 0x1.0p-30l;
11
volatile long double ld11f = 1.1f;
12
volatile long double ld11d = 1.1;
13
volatile long double ld11 = 1.1;
14
 
15
void
16
test_const (void)
17
{
18
  if (1.0f + 0x1.0p-30f != ldadd1)
19
    abort ();
20
  if (ld11f != ld11)
21
    abort ();
22
  if (ld11d != ld11)
23
    abort ();
24
  if (1.1f != ld11)
25
    abort ();
26
}
27
 
28
int
29
main (void)
30
{
31
  test_const ();
32
  exit (0);
33
}

powered by: WebSVN 2.1.0

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