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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr36578-2.c] - Blame information for rev 328

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

Line No. Rev Author Line
1 318 jeremybenn
/* Test for unsafe floating-point conversions.  */
2
/* { dg-do run } */
3
/* { dg-options "-msse2 -mfpmath=sse" } */
4
/* { dg-require-effective-target sse2 } */
5
 
6
#include "sse2-check.h"
7
 
8
extern void abort (void);
9
extern void exit (int);
10
extern int printf(const char *, ...);
11
 
12
volatile double d1 = 0x1.000001p0;
13
volatile double d2 = 0x1p-54;
14
volatile float f = 0x1.000002p0f;
15
volatile float f2;
16
 
17
static void
18
sse2_test (void)
19
{
20
  f2 = (float)((long double)d1 + (long double)d2);
21
  if (f != f2)
22
    abort ();
23
  exit (0);
24
}

powered by: WebSVN 2.1.0

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