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.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [pr24851.c] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
/* We used to handle pointer addition wrongly
2
   at the time of recombining to an ARRAY_REF
3
   in the case of
4
     p + -4B
5
   where -4B is represented as unsigned.  */
6
 
7
void abort(void);
8
int main()
9
{
10
  int a[10], *p, *q;
11
  q = &a[1];
12
  p = &q[-1];
13
  if (p >= &a[9])
14
    abort ();
15
  return 0;
16
}
17
 

powered by: WebSVN 2.1.0

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