aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gm2/pim/run/pass/genconststr.mod
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gm2/pim/run/pass/genconststr.mod')
-rw-r--r--gcc/testsuite/gm2/pim/run/pass/genconststr.mod23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gm2/pim/run/pass/genconststr.mod b/gcc/testsuite/gm2/pim/run/pass/genconststr.mod
new file mode 100644
index 00000000000..d8fa842571c
--- /dev/null
+++ b/gcc/testsuite/gm2/pim/run/pass/genconststr.mod
@@ -0,0 +1,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.