Debian Codegraph @

gcc/testsuite/gm2/pim/run/pass/genconststr.mod

raw
1 MODULE genconststr ;
2
3 FROM libc IMPORT printf, exit ;
4 FROM StrLib IMPORT StrEqual ;
5
6 CONST
7 foo = hello + space + world ;
8 hello = "hello" ;
9 space = " " ;
10 world = "world" ;
11
12 PROCEDURE test (a: ARRAY OF CHAR) ;
13 BEGIN
14 IF NOT StrEqual (a, "hello world")
15 THEN
16 printf ("const string failed\n");
17 exit (1)
18 END
19 END test ;
20
21 BEGIN
22 test (foo)
23 END genconststr.