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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [pr52132.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 689 jeremybenn
/* PR debug/52132 */
2
/* { dg-do compile } */
3
/* { dg-options "-std=c99 -O2 -g" } */
4
 
5
#if  (__SIZEOF_INT__ < __SIZEOF_FLOAT__) \
6
  && (__SIZEOF_LONG__ == __SIZEOF_FLOAT__)
7
#define int long
8
#endif
9
 
10
int l;
11
void bar (void);
12
 
13
void
14
foo (int *x, float y)
15
{
16
  float b;
17
  union { float f; int i; } u = { .f = y };
18
#if  (__SIZEOF_INT__ < __SIZEOF_FLOAT__)
19
  u.i += 127L << 23;
20
#else
21
  u.i += 127 << 23;
22
#endif
23
  u.f = ((-1.0f / 3) * u.f + 2) * u.f - 2.0f / 3;
24
  b = 0.5 * (u.f + l);
25
  if (b >= *x)
26
    bar ();
27
}

powered by: WebSVN 2.1.0

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