diff options
author | Chad Loder <cloder@cvs.openbsd.org> | 2006-05-03 18:45:26 +0000 |
---|---|---|
committer | Chad Loder <cloder@cvs.openbsd.org> | 2006-05-03 18:45:26 +0000 |
commit | 207e50f6d44d523ad337dfd75f4642fb281b2de4 (patch) | |
tree | a1e118af8b6340a1af137300772b294f4b7fe1a7 | |
parent | 4d72b8dd7c70707208d325812c08a89add64aa75 (diff) |
Add some regress tests for lint1 crashes which are not solved yet
-rw-r--r-- | regress/usr.bin/xlint/Makefile | 4 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-21.c | 21 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-21.c.exp | 1 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-22.c | 17 | ||||
-rw-r--r-- | regress/usr.bin/xlint/test-22.c.exp | 1 |
5 files changed, 42 insertions, 2 deletions
diff --git a/regress/usr.bin/xlint/Makefile b/regress/usr.bin/xlint/Makefile index 2c9afbb0ed8..110509395ff 100644 --- a/regress/usr.bin/xlint/Makefile +++ b/regress/usr.bin/xlint/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.24 2006/04/28 18:31:13 otto Exp $ +# $OpenBSD: Makefile,v 1.25 2006/05/03 18:45:25 cloder Exp $ -TEST_MODULES= 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 +TEST_MODULES= 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 22 LINT= lint LINTFLAGS?= -chabx diff --git a/regress/usr.bin/xlint/test-21.c b/regress/usr.bin/xlint/test-21.c new file mode 100644 index 00000000000..6da7d4bef32 --- /dev/null +++ b/regress/usr.bin/xlint/test-21.c @@ -0,0 +1,21 @@ + /* $OpenBSD: test-21.c,v 1.1 2006/05/03 18:45:25 cloder Exp $*/ + +/* + * Placed in the public domain by Chad Loder <cloder@openbsd.org>. + * + * Regression test lint1 crash on function prototypes having functions + * as arguments. + */ +struct foo +{ + int a; +}; + +int bar(int, unsigned int(int, const struct foo *, int)); + +/* ARGSUSED */ +int +main(int argc, char* argv[]) +{ + return 0; +} diff --git a/regress/usr.bin/xlint/test-21.c.exp b/regress/usr.bin/xlint/test-21.c.exp new file mode 100644 index 00000000000..b591b702fb4 --- /dev/null +++ b/regress/usr.bin/xlint/test-21.c.exp @@ -0,0 +1 @@ +Lint pass2: diff --git a/regress/usr.bin/xlint/test-22.c b/regress/usr.bin/xlint/test-22.c new file mode 100644 index 00000000000..c9a137ebb7c --- /dev/null +++ b/regress/usr.bin/xlint/test-22.c @@ -0,0 +1,17 @@ + /* $OpenBSD: test-22.c,v 1.1 2006/05/03 18:45:25 cloder Exp $ */ + +/* + * Placed in the public domain by Chad Loder <cloder@openbsd.org>. + * + * Regression test for lint1 crash on expressions of the type: + * + * char *foo = { "literal" } + */ + +/* ARGSUSED */ +int +main(int argc, char* argv[]) +{ + const char *foo = { "bar" }; + return 0; +} diff --git a/regress/usr.bin/xlint/test-22.c.exp b/regress/usr.bin/xlint/test-22.c.exp new file mode 100644 index 00000000000..b591b702fb4 --- /dev/null +++ b/regress/usr.bin/xlint/test-22.c.exp @@ -0,0 +1 @@ +Lint pass2: |