Debian Codegraph @

gcc/testsuite/gm2/iso/const/pass/constbool5.mod

raw
1 MODULE constbool5 ;
2
3 FROM libc IMPORT printf, exit ;
4
5 CONST
6 World = "W" + "o" + "r" + "l" + "d" ;
7 Hello = "Hello" + " " + World ;
8 AddressableBits = 32 ;
9 MaxBits = 32 ;
10
11 BitsInUse =
12 ORD(AddressableBits > MaxBits) * MaxBits +
13 ORD(AddressableBits <= MaxBits) * AddressableBits +
14 ORD (LENGTH (Hello) = 11) ;
15
16 BEGIN
17 IF BitsInUse = 33
18 THEN
19 printf ("passed\n") ;
20 ELSE
21 printf ("failed\n") ;
22 exit (1)
23 END
24 END constbool5.