diff --git a/test/compiler/snc_test.plt b/test/compiler/snc_test.plt
index f28c7d1a09699ff22fbf682118dce001941f2512..922ec28abb328b694d4c96e21072bcbe657c0645 100644
--- a/test/compiler/snc_test.plt
+++ b/test/compiler/snc_test.plt
@@ -25,6 +25,7 @@ my $tests = {
   syncq_no_size           => { warnings => 1, errors => 0  },
   syncq_not_assigned      => { warnings => 0, errors => 1  },
   syncq_size_out_of_range => { warnings => 0, errors => 1  },
+  type_not_allowed        => { warnings => 2, errors => 9  },
 };
 
 my @progs = sort(keys(%$tests));
diff --git a/test/compiler/type_not_allowed.st b/test/compiler/type_not_allowed.st
new file mode 100644
index 0000000000000000000000000000000000000000..0917f3f6f4a6feb83184b41ad6ffa28eb366f174
--- /dev/null
+++ b/test/compiler/type_not_allowed.st
@@ -0,0 +1,27 @@
+program type_not_allowed
+
+#if 0
+now syntax errors:
+foreign *p_f;           /* error: pointer to foreign entity */
+foreign const c_f;      /* error: constant foreign entity */
+foreign a_f[1];         /* error: array of foreign entities */
+foreign f_f();          /* error: function returning foreign entity */
+#endif
+
+evflag *p_ef;           /* error: pointer to event flag */
+evflag a_ef[1];         /* error: array of event flags */
+evflag const c_ef;      /* error: constant event flag */
+evflag f_ef();          /* error: function returning event flag */
+
+int (const c_a)[1];     /* error: constant array */
+int (const c_f)();      /* warning: constant function */
+int const const cc_i;   /* warning: repeated const */
+
+void a_v[1];            /* error: array of void */
+
+int f__v_i(void, int);  /* error: void must be the only parameter */
+int f__v(void v);       /* error: void parameter should not have a name */
+
+int a_i_zero[0];        /* error: invalid array size (must be >= 1) */
+
+#include "../simple.st"