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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr36373-4.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
struct Foo {
5
    int *p;
6
    int *q;
7
};
8
struct Foo __attribute__((noinline))
9
bar(int *p)
10
{
11
  struct Foo f;
12
  f.p = p;
13
  return f;
14
}
15
void __attribute__((noinline))
16
foo(struct Foo f)
17
{
18
  *f.p = 0;
19
}
20
int main()
21
{
22
  int a, b;
23
  a = 0;
24
  b = 1;
25
  struct Foo f;
26
  f = bar (&b);
27
  f.q = &a;
28
  foo(f);
29
  if (b != 0)
30
    abort ();
31
  return 0;
32
}
33
 

powered by: WebSVN 2.1.0

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