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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20001102-1.c] - Diff between revs 149 and 154

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
/* { dg-do run { target sparc*-*-* } } */
/* { dg-do run { target sparc*-*-* } } */
/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
/* { dg-options "-O2 -mcpu=ultrasparc -mvis" } */
 
 
extern void abort (void);
extern void abort (void);
extern void exit (int);
extern void exit (int);
 
 
int foo(double a, int b, int c, double *d, int h)
int foo(double a, int b, int c, double *d, int h)
{
{
  int f, g;
  int f, g;
  double e;
  double e;
 
 
l:
l:
  f = (int) a;
  f = (int) a;
  a -= (double) f;
  a -= (double) f;
  if (b == 1)
  if (b == 1)
    {
    {
      g = c;
      g = c;
      f += g;
      f += g;
      c -= g;
      c -= g;
    }
    }
  if (b == 2)
  if (b == 2)
    {
    {
      f++;
      f++;
      h = c;
      h = c;
      goto l;
      goto l;
    }
    }
 
 
  asm volatile ("" : : :
  asm volatile ("" : : :
                "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
                "f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
                "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
                "f8", "f9", "f10", "f11", "f12", "f13", "f14", "f15",
                "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
                "f16", "f17", "f18", "f19", "f20", "f21", "f22", "f23",
                "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31");
                "f24", "f25", "f26", "f27", "f28", "f29", "f30", "f31");
 
 
  return f & 7;
  return f & 7;
}
}
 
 
int main()
int main()
{
{
  if (foo(0.1, 1, 3, 0, 1) != 3)
  if (foo(0.1, 1, 3, 0, 1) != 3)
    abort ();
    abort ();
  exit (0);
  exit (0);
}
}
 
 

powered by: WebSVN 2.1.0

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