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.c-torture/] [execute/] [ieee/] [compare-fp-2.c] - Blame information for rev 308

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

Line No. Rev Author Line
1 297 jeremybenn
/* Copyright (C) 2004 Free Software Foundation.
2
 
3
   Ensure that the composite comparison optimization doesn't misfire
4
   and attempt to combine an integer comparison with a floating-point one.
5
 
6
   Written by Paolo Bonzini, 26th May 2004.  */
7
 
8
extern void abort (void);
9
 
10
int
11
foo (double x, double y)
12
{
13
  /* If miscompiled the following may become false.  */
14
  return (x > y) && ((int)x == (int)y);
15
}
16
 
17
int
18
main ()
19
{
20
  if (! foo (1.3,1.0))
21
    abort ();
22
  return 0;
23
}
24
 

powered by: WebSVN 2.1.0

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