[llvm-commits] CVS: llvm/test/Programs/SingleSource/UnitTests/2003-08-20-FoldBug.c
Chris Lattner
lattner at cs.uiuc.edu
Wed Aug 20 16:00:05 PDT 2003
Changes in directory llvm/test/Programs/SingleSource/UnitTests:
2003-08-20-FoldBug.c added (r1.1)
---
Log message:
New testcase, fixed in the (non LLVM portion of the) GCC front-end
---
Diffs of the changes:
Index: llvm/test/Programs/SingleSource/UnitTests/2003-08-20-FoldBug.c
diff -c /dev/null llvm/test/Programs/SingleSource/UnitTests/2003-08-20-FoldBug.c:1.1
*** /dev/null Wed Aug 20 15:59:46 2003
--- llvm/test/Programs/SingleSource/UnitTests/2003-08-20-FoldBug.c Wed Aug 20 15:59:36 2003
***************
*** 0 ****
--- 1,18 ----
+ /* 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");
+ }
+
More information about the llvm-commits
mailing list