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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [xstormy16/] [below_100.c] - Blame information for rev 825

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

Line No. Rev Author Line
1 149 jeremybenn
/* { dg-do compile } */
2
/* { dg-options "-O2" } */
3
/* { dg-final { scan-assembler "bn " } } */
4
/* { dg-final { scan-assembler "b\[np\] " } } */
5
 
6
unsigned short   a_below __attribute__((__BELOW100__));
7
unsigned short   b_below __attribute__((__BELOW100__));
8
unsigned short * a_ptr = & a_below;
9
unsigned short * b_ptr = & b_below;
10
 
11
char *
12
foo (void)
13
{
14
  if (a_below & 0x0100)
15
    {
16
      if (b_below & 0x0100)
17
        return "Fail";
18
      return "Success";
19
    }
20
 
21
  return "Fail";
22
}
23
 
24
char *
25
bar (void)
26
{
27
  *a_ptr = 0x0100;
28
  *b_ptr = 0xfeff;
29
  return foo ();
30
}

powered by: WebSVN 2.1.0

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