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.c-torture/] [execute/] [20041114-1.c] - Blame information for rev 315

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

Line No. Rev Author Line
1 297 jeremybenn
/* Verify that
2
 
3
   var <= 0 || ((long unsigned) (unsigned) (var - 1) < MAX_UNSIGNED_INT)
4
 
5
   gets folded to 1.  */
6
 
7
#include <limits.h>
8
 
9
void abort (void);
10
void link_failure (void);
11
 
12
volatile int v;
13
 
14
void
15
foo (int var)
16
{
17
  if (!(var <= 0
18
        || ((long unsigned) (unsigned) (var - 1) < UINT_MAX)))
19
    link_failure ();
20
}
21
 
22
int
23
main (int argc, char **argv)
24
{
25
  foo (v);
26
  return 0;
27
}
28
 
29
#ifndef __OPTIMIZE__
30
void
31
link_failure (void)
32
{
33
  abort ();
34
}
35
#endif

powered by: WebSVN 2.1.0

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