From f439036ef3a5c37c6a829cac1741d9f9cd50ca6e Mon Sep 17 00:00:00 2001 From: michaelh Date: Sat, 13 Oct 2001 17:40:05 +0000 Subject: [PATCH] * support/regression/tests/longor.c: Added. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1394 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- support/regression/tests/longor.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 support/regression/tests/longor.c diff --git a/support/regression/tests/longor.c b/support/regression/tests/longor.c new file mode 100644 index 00000000..4e30cc5f --- /dev/null +++ b/support/regression/tests/longor.c @@ -0,0 +1,18 @@ +/** Test long OR. + Was a bug where 1 was turned into 0x10000 on PPC. + */ +#include + +void +testLongOR(void) +{ + volatile unsigned long l; + + l = 0; + l |= 1L; + ASSERT(l == 1); + + l = 0; + l |= 1; + ASSERT(l == 1); +} -- 2.30.2