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] - Rev 300

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

/* { dg-do run } */
/* { dg-require-effective-target stdint_types } */
/* { dg-options "-fdump-tree-alias" } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
 
#include <stdint.h>
 
int i;
uintptr_t __attribute__((noinline,const)) bar(int ***p) { return (uintptr_t)p; }
void __attribute__((noinline))
foo(void)
{
  int *y;
  int **a = &y, **x;
  int ***p;
  uintptr_t b;
  b = bar(&a);
  p = (int ***)b;
  x = *p;
  *x = &i; /* *ANYTHING = &i has to make sure that y points to i.  */
  *y = 0;
}
extern void abort (void);
int main()
{
  i = 1;
  foo ();
  if (i != 0)
    abort ();
  return 0;
}
 
/* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
 

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

powered by: WebSVN 2.1.0

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