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-11.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 link } */
2
/* { dg-options "-O2 -fipa-pta -fdump-ipa-pta-details" } */
3
 
4
static int i;
5
/* i should not escape here, p should point to i only.  */
6
/* { dg-final { scan-ipa-dump "p = { i }" "pta" } } */
7
static int *p = &i;
8
 
9
int j;
10
/* q should point to j only.  */
11
/* { dg-final { scan-ipa-dump "q = { j }" "pta" } } */
12
static int *q = &j;
13
 
14
static int k;
15
/* k should escape here, r should point to NONLOCAL, ESCAPED, k.  */
16
int *r = &k;
17
/* { dg-final { scan-ipa-dump "r = { ESCAPED NONLOCAL k }" "pta" } } */
18
 
19
int l;
20
/* s should point to NONLOCAL, ESCAPED, l.  */
21
int *s = &l;
22
/* { dg-final { scan-ipa-dump "s = { ESCAPED NONLOCAL l }" "pta" } } */
23
 
24
/* Make p and q referenced so they do not get optimized out.  */
25
int foo() { return &p < &q; }
26
 
27
int main()
28
{
29
  return 0;
30
}
31
 
32
/* It isn't clear if the escape if l is strictly necessary, if it were
33
   we should have i, r and s in ESCAPED as well.  */
34
 
35
/* { dg-final { scan-ipa-dump "ESCAPED = { ESCAPED NONLOCAL l k }" "pta" } } */
36
/* { 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.