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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20031003-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
/* PR optimization/9325  */
2
 
3
#include <limits.h>
4
 
5
extern void abort (void);
6
 
7
int f1()
8
{
9
  return (int)2147483648.0f;
10
}
11
 
12
int f2()
13
{
14
  return (int)(float)(2147483647);
15
}
16
 
17
int main()
18
{
19
#if INT_MAX == 2147483647
20
  if (f1() != 2147483647)
21
    abort ();
22
#ifdef __SPU__
23
  /* SPU float rounds towards zero.  */
24
  if (f2() != 0x7fffff80)
25
    abort ();
26
#else
27
  if (f2() != 2147483647)
28
    abort ();
29
#endif
30
#endif
31
  return 0;
32
}
33
 

powered by: WebSVN 2.1.0

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