diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2006-04-21 02:37:29 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2006-04-21 02:37:29 +0000 |
commit | 8aa8f27587cc7987ea6331ca32bb3123463f7f57 (patch) | |
tree | 4d320c7d475e748b2e909487a6689ffa15939c89 /regress/usr.bin/xlint/test-17.c | |
parent | 58d7e817ef428a8856f1c3cc7f83754e81acab83 (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.c | 8 |
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; } |