OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

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

Go to most recent revision | Details | Compare with Previous | View Log

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