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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [iftrap-1.c] - Rev 774

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

/* Verify that ifcvt doesn't crash under a number of interesting conditions. */
 
void f1(int p)
{
  if (p)
    __builtin_trap();
}
 
void f2(int p)
{
  if (p)
    __builtin_trap();
  else
    bar();
}
 
void f3(int p)
{
  if (p)
    bar();
  else
    __builtin_trap();
}
 
void f4(int p, int q)
{
  if (p)
    {
      bar();
      if (q)
	bar();
    }
  else
    __builtin_trap();
}
 
void f5(int p)
{
  if (p)
    __builtin_trap();
  else
    abort();
}
 
void f6(int p)
{
  if (p)
    abort();
  else
    __builtin_trap();
}
 
void f7(int p)
{
  if (p)
    __builtin_trap();
  else
    __builtin_trap();
}
 
void f8(int p)
{
  if (p)
    __builtin_trap();
  else
    {
      bar();
      __builtin_trap();
    }
}
 
void f9(int p)
{
  if (p)
    {
      bar();
      __builtin_trap();
    }
  else
    __builtin_trap();
}
 
void f10(int p)
{
  if (p)
    __builtin_trap();
  while (1)
    bar();
}
 
void f11(int p)
{
  if (p)
    __builtin_trap();
  else
    bar();
  while (1)
    baz();
}
 

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

powered by: WebSVN 2.1.0

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