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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr44202-1.c] - Blame information for rev 297

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
extern __attribute__ ((__noreturn__)) void exit(int);
2
extern __attribute__ ((__noreturn__)) void abort(void);
3
__attribute__ ((__noinline__))
4
int
5
add512(int a, int *b)
6
{
7
  int c = a + 512;
8
  if (c != 0)
9
    *b = a;
10
  return c;
11
}
12
 
13
__attribute__ ((__noinline__))
14
int
15
add513(int a, int *b)
16
{
17
  int c = a + 513;
18
  if (c == 0)
19
    *b = a;
20
  return c;
21
}
22
 
23
int main(void)
24
{
25
  int b0 = -1;
26
  int b1 = -1;
27
  if (add512(-512, &b0) != 0 || b0 != -1 || add513(-513, &b1) != 0 || b1 != -513)
28
    abort ();
29
  exit (0);
30
}

powered by: WebSVN 2.1.0

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