From: michaelh Date: Sat, 13 Oct 2001 17:40:05 +0000 (+0000) Subject: * support/regression/tests/longor.c: Added. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=f439036ef3a5c37c6a829cac1741d9f9cd50ca6e;hp=62298aa56bebc07b254ae6a5b69c9585ae9f23d2;p=fw%2Fsdcc * support/regression/tests/longor.c: Added. git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@1394 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- 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); +}