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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [iftrap-1.c] - Rev 12

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();
}
 

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.