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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [ipa/] [ipa-pta-16.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 "-O2 -fno-tree-sra -fipa-pta -fdump-ipa-pta" } */
3
 
4
struct X
5
{
6
  long l1;
7
  struct Y
8
    {
9
      long l2;
10
      int *p;
11
    } y;
12
};
13
int i;
14
static int __attribute__((noinline))
15
foo (struct X *x)
16
{
17
  struct Y y = x->y;
18
  *y.p = 0;
19
  i = 1;
20
  return *y.p;
21
}
22
extern void abort (void);
23
int main()
24
{
25
  struct X x;
26
  x.y.p = &i;
27
  if (foo(&x) != 1)
28
    abort ();
29
  return 0;
30
}
31
 
32
/* { dg-final { scan-ipa-dump "y.\[0-9\]*\\\+\[0-9\]* = { i }" "pta" } } */
33
/* { dg-final { cleanup-ipa-dump "pta" } } */

powered by: WebSVN 2.1.0

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