Added a test that at some point failed for the new CEMCOM
authorceriel <none@none>
Tue, 19 Jan 1988 11:45:43 +0000 (11:45 +0000)
committerceriel <none@none>
Tue, 19 Jan 1988 11:45:43 +0000 (11:45 +0000)
lang/cem/ctest/ctconv/conv.c
lang/cem/ctest/ctconv/conv.cem.g

index 8d6475f..6ff5d5d 100644 (file)
@@ -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);
+}
index edc594e..2652591 100644 (file)
@@ -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