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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20060930-2.c] - Blame information for rev 856

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR middle-end/29272 */
2
 
3
extern void abort (void);
4
 
5
struct S { struct S *s; } s;
6
struct T { struct T *t; } t;
7
 
8
static inline void
9
foo (void *s)
10
{
11
  struct T *p = s;
12
  __builtin_memcpy (&p->t, &t.t, sizeof (t.t));
13
}
14
 
15
void *
16
__attribute__((noinline))
17
bar (void *p, struct S *q)
18
{
19
  q->s = &s;
20
  foo (p);
21
  return q->s;
22
}
23
 
24
int
25
main (void)
26
{
27
  t.t = &t;
28
  if (bar (&s, &s) != (void *) &t)
29
    abort ();
30
  return 0;
31
}

powered by: WebSVN 2.1.0

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