From 9dfa2f6979576ef88e72ff0b876ffcd1d687f5ec Mon Sep 17 00:00:00 2001 From: ceriel Date: Tue, 19 Jan 1988 11:45:43 +0000 Subject: [PATCH] Added a test that at some point failed for the new CEMCOM --- lang/cem/ctest/ctconv/conv.c | 12 ++++++++++++ lang/cem/ctest/ctconv/conv.cem.g | 2 ++ 2 files changed, 14 insertions(+) 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