aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/compiler/testdata
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/compiler/testdata')
-rw-r--r--pkg/compiler/testdata/all.txt16
-rw-r--r--pkg/compiler/testdata/errors.txt3
-rw-r--r--pkg/compiler/testdata/errors2.txt14
3 files changed, 33 insertions, 0 deletions
diff --git a/pkg/compiler/testdata/all.txt b/pkg/compiler/testdata/all.txt
index d03e35def..6fd9f7cc6 100644
--- a/pkg/compiler/testdata/all.txt
+++ b/pkg/compiler/testdata/all.txt
@@ -322,3 +322,19 @@ struct$fmt0 {
}
flags_with_one_value = 0
+
+# Compressed images.
+
+struct_compressed {
+ f0 compressed_image
+}
+
+union_compressed [
+ f0 compressed_image
+ f1 int32
+] [varlen]
+
+compressed$1(a compressed_image) (no_generate, no_minimize)
+compressed$2(a ptr[in, compressed_image]) (no_generate, no_minimize)
+compressed$3(a ptr[in, struct_compressed]) (no_generate, no_minimize)
+compressed$4(a ptr[in, union_compressed]) (no_generate, no_minimize) \ No newline at end of file
diff --git a/pkg/compiler/testdata/errors.txt b/pkg/compiler/testdata/errors.txt
index 1201fa361..9d625a34b 100644
--- a/pkg/compiler/testdata/errors.txt
+++ b/pkg/compiler/testdata/errors.txt
@@ -422,3 +422,6 @@ union$directions [
f1 int32 (in) ### unknown arg/field f1 attribute in
f2 int32 (out) ### unknown arg/field f2 attribute out
]
+
+
+compressed$test(a int32) compressed_image ### compressed_image can't be syscall return
diff --git a/pkg/compiler/testdata/errors2.txt b/pkg/compiler/testdata/errors2.txt
index 482314b4a..3cd63ebd2 100644
--- a/pkg/compiler/testdata/errors2.txt
+++ b/pkg/compiler/testdata/errors2.txt
@@ -407,3 +407,17 @@ struct$out0 {
f2 proc[0, 1, int32] (out) ### proc type must not be used as output
f3 bytesize[f1, int32] (out) ### bytesize type must not be used as output
}
+
+struct_non_generatable {
+ f0 ptr[in, array[compressed_image]]
+}
+
+union_non_minimizable [
+ f0 struct_non_generatable
+ f2 int32
+]
+
+foo$non_generatable(a compressed_image) (no_minimize) ### call foo$non_generatable refers to type compressed_image and so must be marked no_generate
+foo$non_minimizable(a compressed_image) (no_generate) ### call foo$non_minimizable refers to type compressed_image and so must be marked no_minimize
+foo$non_generatable_via_struct(a ptr[in, struct_non_generatable]) (no_minimize) ### call foo$non_generatable_via_struct refers to type compressed_image and so must be marked no_generate
+foo$non_minimizable_via_union(a ptr[in, union_non_minimizable]) (no_generate) ### call foo$non_minimizable_via_union refers to type compressed_image and so must be marked no_minimize