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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr39074.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
/* { dg-options "-fdump-tree-alias" } */
3
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
4
 
5
typedef __PTRDIFF_TYPE__ intptr_t;
6
 
7
int i;
8
void __attribute__((noinline))
9
foo(long b, intptr_t q)
10
{
11
  int *y;
12
  int **a = &y, **x;
13
  int ***p;
14
  if (b)
15
    p = (int ***)q;
16
  else
17
    p = &a;
18
  x = *p;
19
  *x = &i;  /* *ANYTHING = &i has to make sure that y points to i.  */
20
  *y = 0;
21
}
22
extern void abort (void);
23
int main()
24
{
25
  i = 1;
26
  foo (0, 0);
27
  if (i != 0)
28
    abort ();
29
  return 0;
30
}
31
 
32
/* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */
33
/* { 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.