summaryrefslogtreecommitdiff
path: root/regress/usr.bin/xlint/test-17.c
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-04-21 02:37:29 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-04-21 02:37:29 +0000
commit8aa8f27587cc7987ea6331ca32bb3123463f7f57 (patch)
tree4d320c7d475e748b2e909487a6689ffa15939c89 /regress/usr.bin/xlint/test-17.c
parent58d7e817ef428a8856f1c3cc7f83754e81acab83 (diff)
Regression test for lint crash dealing with break outside a switch or a
loop. Found by dlg
Diffstat (limited to 'regress/usr.bin/xlint/test-17.c')
-rw-r--r--regress/usr.bin/xlint/test-17.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/regress/usr.bin/xlint/test-17.c b/regress/usr.bin/xlint/test-17.c
index 58870ab8a7e..337c36bbc6b 100644
--- a/regress/usr.bin/xlint/test-17.c
+++ b/regress/usr.bin/xlint/test-17.c
@@ -1,4 +1,4 @@
- /* $OpenBSD: test-17.c,v 1.1 2006/04/20 03:39:14 cloder Exp $ */
+ /* $OpenBSD: test-17.c,v 1.2 2006/04/21 02:37:28 cloder Exp $ */
/*
* Placed in the public domain by Chad Loder <cloder@openbsd.org>.
@@ -26,6 +26,11 @@ main(int argc, char* argv[])
break; /* should warn */
}
break;
+ case 3:
+ switch (a) {
+ case 0:
+ break;
+ }
default:
break;
}
@@ -40,5 +45,6 @@ main(int argc, char* argv[])
break;
}
+ break;
return a;
}