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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20060910-1.c] - Blame information for rev 816

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR rtl-optimization/28636 */
2
/* Origin: Andreas Schwab <schwab@suse.de> */
3
 
4
extern void abort(void);
5
 
6
struct input_ty
7
{
8
  unsigned char *buffer_position;
9
  unsigned char *buffer_end;
10
};
11
 
12
int input_getc_complicated (struct input_ty *x) { return 0; }
13
 
14
int check_header (struct input_ty *deeper)
15
{
16
  unsigned len;
17
  for (len = 0; len < 6; len++)
18
    if (((deeper)->buffer_position < (deeper)->buffer_end
19
         ? *((deeper)->buffer_position)++
20
         : input_getc_complicated((deeper))) < 0)
21
      return 0;
22
  return 1;
23
}
24
 
25
struct input_ty s;
26
unsigned char b[6];
27
 
28
int main (void)
29
{
30
  s.buffer_position = b;
31
  s.buffer_end = b + sizeof b;
32
  if (!check_header(&s))
33
    abort();
34
  if (s.buffer_position != s.buffer_end)
35
    abort();
36
  return 0;
37
}

powered by: WebSVN 2.1.0

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