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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [postincr-1.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* Simple test for proper postincrement semantics.  */
2
/* { dg-do run } */
3
 
4
extern void abort (void);
5
 
6
int i;
7
int c;
8
int *f ()
9
{
10
  ++c;
11
  return &i;
12
}
13
 
14
int main ()
15
{
16
  int r;
17
  r = (*f())++;
18
  if (!(r == 0 && i == 1 && c == 1))
19
    abort ();
20
  return 0;
21
}

powered by: WebSVN 2.1.0

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