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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [struct-aliasing-1.c] - Blame information for rev 801

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

Line No. Rev Author Line
1 688 jeremybenn
struct S { float f; };
2
int __attribute__((noinline))
3
foo (int *r, struct S *p)
4
{
5
  int *q = (int *)&p->f;
6
  int i = *q;
7
  *r = 0;
8
  return i + *q;
9
}
10
extern void abort (void);
11
int main()
12
{
13
  int i = 1;
14
  if (foo (&i, (struct S *)&i) != 1)
15
    abort ();
16
  return (0);
17
}

powered by: WebSVN 2.1.0

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