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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [unsorted/] [r1.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
void assert (a) {if (a != 1) abort ();}
2
 
3
int h1 (int *p) {return *p & 255;}
4
 
5
void p1 () {int a = 0x01020304; assert (h1 (&a) == 0x04);}
6
 
7
 
8
int h2 (a) {return a > 0;}
9
 
10
p2 () {assert (h2 (1));}
11
 
12
h3 (int *p)
13
{
14
  *p |= 255;
15
}
16
 
17
p3 ()
18
{
19
  int *p;
20
  h3 (p);
21
}
22
 
23
main ()
24
{
25
  p1 ();
26
  p2 ();
27
  p3 ();
28
  puts ("Compiler test passed.");
29
}

powered by: WebSVN 2.1.0

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