summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2007-09-26 11:29:10 +0000
committerotto <otto@openbsd.org>2007-09-26 11:29:10 +0000
commita4973596605f534c5ac186095b5b0e0a71b5a7f9 (patch)
tree1c3e8fbc78f9d3020aa1a62e92ab717c0cd3439f
parentreuse available var, from Mark Lumsden (diff)
downloadwireguard-openbsd-a4973596605f534c5ac186095b5b0e0a71b5a7f9.tar.xz
wireguard-openbsd-a4973596605f534c5ac186095b5b0e0a71b5a7f9.zip
two more test cases
-rw-r--r--regress/usr.bin/pcc/cc/ccom/darray001.c9
-rw-r--r--regress/usr.bin/pcc/cc/ccom/init004.c21
2 files changed, 30 insertions, 0 deletions
diff --git a/regress/usr.bin/pcc/cc/ccom/darray001.c b/regress/usr.bin/pcc/cc/ccom/darray001.c
new file mode 100644
index 00000000000..aadb779af92
--- /dev/null
+++ b/regress/usr.bin/pcc/cc/ccom/darray001.c
@@ -0,0 +1,9 @@
+/* should not issue: darray001.c, line 5: compiler error: bad conversion */
+/* From TAKAHASHI Tamotsu */
+int main(void) {
+ int n=1;
+ int a[1][n];
+ a[0][0]=1; /* this line */
+ return 0;
+}
+
diff --git a/regress/usr.bin/pcc/cc/ccom/init004.c b/regress/usr.bin/pcc/cc/ccom/init004.c
new file mode 100644
index 00000000000..96c6c62478e
--- /dev/null
+++ b/regress/usr.bin/pcc/cc/ccom/init004.c
@@ -0,0 +1,21 @@
+/* should not issue: init004.c, line 17: warning: illegal pointer combination */
+
+struct ops;
+
+typedef enum { aap} Linetype;
+
+typedef Linetype eval_fn(const struct ops *, int *, const char **);
+
+static eval_fn eval_table, eval_unary;
+
+static const struct ops {
+ eval_fn *inner;
+ struct op {
+ const char *str;
+ int (*fn)(int, int);
+ } op[5];
+} eval_ops[] = {
+ { eval_table, { { "||", 0 } } },
+};
+
+