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

Subversion Repositories openrisc

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

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

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

powered by: WebSVN 2.1.0

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