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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr45967-2.c] - Blame information for rev 689

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 689 jeremybenn
/* { dg-do run } */
2
 
3
extern void abort (void);
4
int b;
5
void
6
foo (void *p_, int *q)
7
{
8
  int *p;
9
  int i;
10
  for (i = 0; i < sizeof(int *); ++i)
11
    ((char *)&p)[i] = ((char *)p_)[i];
12
  if (b)
13
    p = q;
14
  *p = 1;
15
}
16
int main()
17
{
18
  int i = 0, j;
19
  int *p = &i;
20
  foo (&p, &j);
21
  if (i != 1)
22
    abort ();
23
  return 0;
24
}

powered by: WebSVN 2.1.0

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