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

Subversion Repositories openrisc

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

powered by: WebSVN 2.1.0

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