From 8aa8f27587cc7987ea6331ca32bb3123463f7f57 Mon Sep 17 00:00:00 2001 From: Chad Loder Date: Fri, 21 Apr 2006 02:37:29 +0000 Subject: Regression test for lint crash dealing with break outside a switch or a loop. Found by dlg --- regress/usr.bin/xlint/test-17.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'regress/usr.bin/xlint/test-17.c') 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 . @@ -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; } -- cgit v1.2.3