OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr33560.c] - Blame information for rev 300

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

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
struct T
4
{
5
  int a, b;
6
} t;
7
 
8
__attribute__((noinline)) struct T *f (struct T *p)
9
{
10
  struct T *q = __builtin_malloc (sizeof (struct T));
11
  *q = *p;
12
  return q;
13
}
14
 
15
int main (void)
16
{
17
  struct T *p;
18
 
19
  t.a = 1;
20
  t.b = 2;
21
  p = f (&t);
22
  t.a = 3;
23
 
24
  if (p->a != 1)
25
    __builtin_abort ();
26
 
27
  return 0;
28
}
29
 

powered by: WebSVN 2.1.0

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