Add test case for this patch to combine.c:
authorNick Clifton <nickc@cygnus.com>
Thu, 23 Sep 1999 14:58:00 +0000 (14:58 +0000)
committerNick Clifton <nickc@gcc.gnu.org>
Thu, 23 Sep 1999 14:58:00 +0000 (14:58 +0000)
* combine.c (simplify_comparison): Use an unsigned shift to adjust
the constant.

From-SVN: r29620

gcc/testsuite/gcc.c-torture/ChangeLog
gcc/testsuite/gcc.c-torture/execute/990923-1.c [new file with mode: 0644]

index 5c2051b..d4a4dd8 100644 (file)
@@ -1,3 +1,7 @@
+1999-09-23  Nick Clifton  <nickc@cygnus.com>
+
+       * execute/990923-1.c: New test.
+
 1999-09-21  Nick Clifton  <nickc@cygnus.com>
 
        * special/special.exp: Add FR30 to list of targets for which -fpic
diff --git a/gcc/testsuite/gcc.c-torture/execute/990923-1.c b/gcc/testsuite/gcc.c-torture/execute/990923-1.c
new file mode 100644 (file)
index 0000000..4f4e87a
--- /dev/null
@@ -0,0 +1,19 @@
+#define mask  0xffff0000L
+#define value 0xabcd0000L
+
+long
+foo (long x)
+{
+  if ((x & mask) == value)
+    return x & 0xffffL;
+  return 1;
+}
+
+int 
+main (void)
+{
+  if (foo (value) != 0 || foo (0) != 1)
+    abort ();
+  
+  exit (0);
+}