From: ceriel Date: Tue, 19 Jan 1988 11:45:43 +0000 (+0000) Subject: Added a test that at some point failed for the new CEMCOM X-Git-Tag: release-5-5~3647 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=9dfa2f6979576ef88e72ff0b876ffcd1d687f5ec;p=ack.git Added a test that at some point failed for the new CEMCOM --- diff --git a/lang/cem/ctest/ctconv/conv.c b/lang/cem/ctest/ctconv/conv.c index 8d6475fa3..6ff5d5d63 100644 --- a/lang/cem/ctest/ctconv/conv.c +++ b/lang/cem/ctest/ctconv/conv.c @@ -10,6 +10,7 @@ char rcs_id[] = "$Header$" ; main() { t1() ; + t2() ; return 0 ; } @@ -139,3 +140,14 @@ t1() { } return 0 ; } + +t2() +{ + long l1 = 0x1f010L; + long l2; + + l2 = (unsigned short) l1; + printf("(unsigned short) 0x1f010L = 0x%lx\n", l2); + l2 = (short) l1; + printf("(short) 0x1f010L = 0x%lx\n", l2); +} diff --git a/lang/cem/ctest/ctconv/conv.cem.g b/lang/cem/ctest/ctconv/conv.cem.g index edc594e2a..26525917c 100644 --- a/lang/cem/ctest/ctconv/conv.cem.g +++ b/lang/cem/ctest/ctconv/conv.cem.g @@ -30,3 +30,5 @@ From float long 1223432064, float 1223432064.000000 a[l] (l==3) -17 a[3l] -17 +(unsigned short) 0x1f010L = 0xf010 +(short) 0x1f010L = 0xfffff010