aboutsummaryrefslogtreecommitdiff
path: root/SingleSource/UnitTests/2003-08-20-FoldBug.c
blob: 053417b74fe8b0732a3aad2fc8bf1da5a92fad2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* This testcase checks for a bug in the GCC front-end to make sure it's not 
   folding expressions incorrectly */

#include <stdio.h>
extern void abort (void);
int
foo (int x)
{
  if ((int) (x & 0x80ffffff) != (int) (0x8000fffe))
    abort ();

  return 0;
}
int main () {
  foo (0x8000fffe);
  printf("All ok\n");
  return 0;
}