aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans-Peter Nilsson <hp@axis.com>2000-04-04 12:45:36 +0000
committerHans-Peter Nilsson <hp@axis.com>2000-04-04 12:45:36 +0000
commitae36304e9657ba341bb6884549006967a82494f8 (patch)
tree4413bc46da8a756cc06bfc637064c31b65f0501e
parentb65de5a161875fff0b7feb5a125831b735cad90b (diff)
* execute/20000403-1.c: New test.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@32902 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/gcc.c-torture/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20000403-1.c29
2 files changed, 33 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog b/gcc/testsuite/gcc.c-torture/ChangeLog
index e26dc7d8761..6a3881d82ae 100644
--- a/gcc/testsuite/gcc.c-torture/ChangeLog
+++ b/gcc/testsuite/gcc.c-torture/ChangeLog
@@ -1,3 +1,7 @@
+Mon Apr 3 16:53:52 2000 Hans-Peter Nilsson <hp@axis.com>
+
+ * execute/20000403-1.c: New test.
+
2000-04-03 Geoff Keating <geoffk@cygnus.com>
* execute/20000402-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000403-1.c b/gcc/testsuite/gcc.c-torture/execute/20000403-1.c
new file mode 100644
index 00000000000..8bcd6f133ce
--- /dev/null
+++ b/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 };