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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20020418-1.c] - Blame information for rev 149

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR optimization/5887 */
2
/* { dg-do compile } */
3
/* { dg-options "-O2" } */
4
/* { dg-options "-O2 -msse -ffast-math" { target i?86-*-* x86_64-*-* } } */
5
 
6
void bar (float *a, float *b);
7
 
8
void foo (char *x)
9
{
10
  float a, b;
11
  char c[256];
12
  int i, j;
13
 
14
  bar (&a, &b);
15
  for (i = 0; i < 256; i++)
16
    {
17
      float v = a;
18
      if (v < 0.0f) v = 0.0f;
19
      if (v < 255.0f) v = 255.0f;
20
      c[i] = v;
21
      a += b;
22
    }
23
 
24
  for (j = 0; j < 256; j++)
25
    x[j] = c[j];
26
}

powered by: WebSVN 2.1.0

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