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-14.c] - Blame information for rev 706

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 "-O2 -fipa-pta -fno-tree-fre -fno-tree-sra -fdump-ipa-pta-details" } */
3
 
4
struct X {
5
    int i;
6
    void *p;
7
};
8
 
9
static void * __attribute__((noinline,noclone))
10
foo(struct X *q, void *p)
11
{
12
  struct X b;
13
  b.p = p;
14
  *q = b;
15
  return q->p;
16
}
17
extern void abort (void);
18
int main()
19
{
20
  struct X a, c;
21
  void *p;
22
  a.p = (void *)&c;
23
  p = foo(&a, &a);
24
  /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* c\[^ \]* }" "pta" { xfail *-*-* } } } */
25
  /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* a\[^ \]* c\[^ \]* }" "pta" } } */
26
  ((struct X *)p)->p = (void *)0;
27
  if (a.p != (void *)0)
28
    abort ();
29
  return 0;
30
}
31
 
32
/* { 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.