aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000403-1.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000403-1.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000403-1.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
new file mode 100644
index 000000000..8bcd6f133
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
@@ -0,0 +1,29 @@
+extern unsigned long aa[], bb[];
+
+int seqgt (unsigned long a, unsigned short win, unsigned long b);
+
+int seqgt2 (unsigned long a, unsigned short win, unsigned long b);
+
+main()
+{
+ if (! seqgt (*aa, 0x1000, *bb) || ! seqgt2 (*aa, 0x1000, *bb))
+ abort ();
+
+ exit (0);
+}
+
+int
+seqgt (unsigned long a, unsigned short win, unsigned long b)
+{
+ return (long) ((a + win) - b) > 0;
+}
+
+int
+seqgt2 (unsigned long a, unsigned short win, unsigned long b)
+{
+ long l = ((a + win) - b);
+ return l > 0;
+}
+
+unsigned long aa[] = { (1UL << (sizeof (long) * 8 - 1)) - 0xfff };
+unsigned long bb[] = { (1UL << (sizeof (long) * 8 - 1)) - 0xfff };