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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.dg/] [opt/] [loop1.C] - Blame information for rev 12

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 12 jlechner
// 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.