summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
Diffstat (limited to 'regress')
-rw-r--r--regress/usr.bin/pcc/ccom/Makefile4
-rw-r--r--regress/usr.bin/pcc/ccom/mustfail0000.c6
-rw-r--r--regress/usr.bin/pcc/ccom/mustpass0000.c10
-rw-r--r--regress/usr.bin/pcc/ccom/mustpass0001.c9
4 files changed, 28 insertions, 1 deletions
diff --git a/regress/usr.bin/pcc/ccom/Makefile b/regress/usr.bin/pcc/ccom/Makefile
index c8de94bea6c..0ebf3d9148b 100644
--- a/regress/usr.bin/pcc/ccom/Makefile
+++ b/regress/usr.bin/pcc/ccom/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2007/11/06 14:59:45 stefan Exp $
+# $OpenBSD: Makefile,v 1.5 2008/01/24 18:16:47 stefan Exp $
CC=/usr/local/bin/cc
@@ -8,6 +8,7 @@ REGRESS_TARGETS=\
darray001 \
enum001 \
init001 init004 \
+ mustpass0000 mustpass0001 \
switch003 \
tmpalloc001 \
shouldfail
@@ -22,6 +23,7 @@ shouldfail:
if ${CC} ${.CURDIR}/init003.c; then false; else true; fi
if ${CC} ${.CURDIR}/switch001.c; then false; else true; fi
if ${CC} ${.CURDIR}/switch002.c; then false; else true; fi
+ if ${CC} ${.CURDIR}/mustfail0000.c; then false; else true; fi
clean:
rm -f *.out
diff --git a/regress/usr.bin/pcc/ccom/mustfail0000.c b/regress/usr.bin/pcc/ccom/mustfail0000.c
new file mode 100644
index 00000000000..b9f223478c8
--- /dev/null
+++ b/regress/usr.bin/pcc/ccom/mustfail0000.c
@@ -0,0 +1,6 @@
+int a(typedef int a);
+int b(extern int b);
+int c(auto int c);
+int d(static int d);
+
+int main(void) { return 1; }
diff --git a/regress/usr.bin/pcc/ccom/mustpass0000.c b/regress/usr.bin/pcc/ccom/mustpass0000.c
new file mode 100644
index 00000000000..e7ff1688dfb
--- /dev/null
+++ b/regress/usr.bin/pcc/ccom/mustpass0000.c
@@ -0,0 +1,10 @@
+typedef int a;
+typedef int b;
+
+int
+main(void)
+{
+ enum a { a = 1, b = a + 2, c = a + b + 3 };
+
+ return 0;
+}
diff --git a/regress/usr.bin/pcc/ccom/mustpass0001.c b/regress/usr.bin/pcc/ccom/mustpass0001.c
new file mode 100644
index 00000000000..01383ca23b0
--- /dev/null
+++ b/regress/usr.bin/pcc/ccom/mustpass0001.c
@@ -0,0 +1,9 @@
+typedef int a;
+
+int
+main(void)
+{
+ struct x { int a; } a;
+
+ return 0;
+}