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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr36373-1.c] - Blame information for rev 689

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 Bar {
6
    struct Foo {
7
        int *p;
8
    } x;
9
    int *q;
10
};
11
struct Foo __attribute__((noinline))
12
bar(int *p)
13
{
14
  struct Foo f;
15
  f.p = p;
16
  return f;
17
}
18
void __attribute__((noinline))
19
foo(struct Foo f)
20
{
21
  *f.p = 0;
22
}
23
int main()
24
{
25
  int a, b;
26
  a = 0;
27
  b = 1;
28
  struct Bar f;
29
  f.x = bar (&b);
30
  f.q = &a;
31
  foo(f.x);
32
  if (b != 0)
33
    abort ();
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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