aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gm2/pim/run/pass/genconststr.mod
blob: d8fa842571cd291bff04a1d5f5ea62d327e9a490 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
MODULE genconststr ;

FROM libc IMPORT printf, exit ;
FROM StrLib IMPORT StrEqual ;

CONST
   foo = hello + space + world ;
   hello = "hello" ;
   space = " " ;
   world = "world" ;

PROCEDURE test (a: ARRAY OF CHAR) ;
BEGIN
   IF NOT StrEqual (a, "hello world")
   THEN
      printf ("const string failed\n");
      exit (1)
   END
END test ;

BEGIN
   test (foo)
END genconststr.