* support/regression/tests/longor.c: Added.
authormichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 13 Oct 2001 17:40:05 +0000 (17:40 +0000)
committermichaelh <michaelh@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 13 Oct 2001 17:40:05 +0000 (17:40 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1394 4a8a32a2-be11-0410-ad9d-d568d2c75423

support/regression/tests/longor.c [new file with mode: 0644]

diff --git a/support/regression/tests/longor.c b/support/regression/tests/longor.c
new file mode 100644 (file)
index 0000000..4e30cc5
--- /dev/null
@@ -0,0 +1,18 @@
+/** Test long OR.
+    Was a bug where 1 was turned into 0x10000 on PPC.
+ */
+#include <testfwk.h>
+
+void
+testLongOR(void)
+{
+  volatile unsigned long l;
+
+  l = 0;
+  l |= 1L;
+  ASSERT(l == 1);
+
+  l = 0;
+  l |= 1;
+  ASSERT(l == 1);
+}