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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20030828-2.c] - Blame information for rev 688

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 688 jeremybenn
struct rtx_def
2
{
3
  int code;
4
};
5
 
6
main()
7
{
8
  int tmp[2];
9
  struct rtx_def *r, s;
10
  int *p, *q;
11
 
12
  /* The alias analyzer was creating the same memory tag for r, p and q
13
     because 'struct rtx_def *' is type-compatible with 'int *'.  However,
14
     the alias set of 'int[2]' is not the same as 'int *', so variable
15
     'tmp' was deemed not aliased with anything.  */
16
  r = &s;
17
  r->code = 39;
18
 
19
  /* If 'r' wasn't declared, then q and tmp would have had the same memory
20
     tag.  */
21
  p = tmp;
22
  q = p + 1;
23
  *q = 0;
24
  tmp[1] = 39;
25
  if (*q != 39)
26
    abort ();
27
  exit (0);
28
}

powered by: WebSVN 2.1.0

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