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/] [20060929-1.c] - Blame information for rev 308

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR c/29154 */
2
 
3
extern void abort (void);
4
 
5
void
6
foo (int **p, int *q)
7
{
8
  *(*p++)++ = *q++;
9
}
10
 
11
void
12
bar (int **p, int *q)
13
{
14
  **p = *q++;
15
  *(*p++)++;
16
}
17
 
18
void
19
baz (int **p, int *q)
20
{
21
  **p = *q++;
22
  (*p++)++;
23
}
24
 
25
int
26
main (void)
27
{
28
  int i = 42, j = 0;
29
  int *p = &i;
30
  foo (&p, &j);
31
  if (p - 1 != &i || j != 0 || i != 0)
32
    abort ();
33
  i = 43;
34
  p = &i;
35
  bar (&p, &j);
36
  if (p - 1 != &i || j != 0 || i != 0)
37
    abort ();
38
  i = 44;
39
  p = &i;
40
  baz (&p, &j);
41
  if (p - 1 != &i || j != 0 || i != 0)
42
    abort ();
43
  return 0;
44
}

powered by: WebSVN 2.1.0

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