add new shouldpass category
authorMatthias Braun <matze@braunis.de>
Fri, 30 May 2008 14:30:36 +0000 (14:30 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 30 May 2008 14:30:36 +0000 (14:30 +0000)
[r19850]

parsetest/shouldpass/README [new file with mode: 0644]
parsetest/shouldpass/fewparams.c [new file with mode: 0644]

diff --git a/parsetest/shouldpass/README b/parsetest/shouldpass/README
new file mode 100644 (file)
index 0000000..f08a2cf
--- /dev/null
@@ -0,0 +1,2 @@
+This directory contains testapps that exploit undefined behaviour, but should
+pass for practical reasons.
diff --git a/parsetest/shouldpass/fewparams.c b/parsetest/shouldpass/fewparams.c
new file mode 100644 (file)
index 0000000..d0e2b62
--- /dev/null
@@ -0,0 +1,16 @@
+static void foo();
+
+static void kaputt(void) {
+       foo(1);
+}
+
+static void foo(int a, int b) {
+       (void) a;
+       (void) b;
+       printf("%d %d\n", a, b);
+}
+
+int main(void) {
+       kaputt();
+       return 0;
+}