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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [opt/] [loop1.C] - Blame information for rev 710

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

Line No. Rev Author Line
1 693 jeremybenn
// PR rtl-optimization/16590
2
// { dg-do run }
3
// { dg-options "-O2" }
4
 
5
extern "C" void abort();
6
 
7
struct iterator {
8
  char * p;
9
  int *dummy;
10
};
11
 
12
static iterator pend(char * start) {
13
  iterator p = {start, 0};
14
  if (p.p == start) p.p = start+5;
15
  --p.p;
16
  return p;
17
}
18
 
19
int main() {
20
  char mem[4+1];
21
 
22
  if(pend(mem).p != mem+4)
23
    abort ();
24
}

powered by: WebSVN 2.1.0

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