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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.target/] [xstormy16/] [below_100.c] - Rev 751

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

/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler "bn " } } */
/* { dg-final { scan-assembler "b\[np\] " } } */
 
unsigned short   a_below __attribute__((__BELOW100__));
unsigned short   b_below __attribute__((__BELOW100__));
unsigned short * a_ptr = & a_below;
unsigned short * b_ptr = & b_below;
 
char *
foo (void)
{
  if (a_below & 0x0100)
    {
      if (b_below & 0x0100)
	return "Fail";
      return "Success";
    }
 
  return "Fail";
}
 
char *
bar (void)
{
  *a_ptr = 0x0100;
  *b_ptr = 0xfeff;
  return foo ();
}
 

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.