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

Subversion Repositories openrisc

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

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 "-fdump-tree-alias" } */
3
/* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */
4
 
5
int *p;
6
void __attribute__((noinline,noclone))
7
bar (void)
8
{
9
  *p = 1;
10
}
11
int __attribute__((noinline,noclone))
12
foo (__SIZE_TYPE__ addr)
13
{
14
  int i;
15
  /* q points to ANYTHING */
16
  int **q = (int **)addr;
17
  /* this store needs to cause i to escape */
18
  *q = &i;
19
  i = 0;
20
  /* and thus be clobbered by this function call */
21
  bar ();
22
  return i;
23
}
24
extern void abort (void);
25
int
26
main()
27
{
28
  if (foo ((__SIZE_TYPE__)&p) != 1)
29
    abort ();
30
  return 0;
31
}
32
 
33
/* { dg-final { scan-tree-dump "ESCAPED = {\[^\n\}\]* i \[^\n\}\]*}" "alias" } } */
34
/* { dg-final { cleanup-tree-dump "alias" } } */

powered by: WebSVN 2.1.0

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