Module Name: src Committed By: rillig Date: Thu Aug 5 06:34:43 UTC 2021
Modified Files: src/distrib/sets/lists/tests: mi src/tests/usr.bin/xlint/lint1: Makefile accept.sh Added Files: src/tests/usr.bin/xlint/lint1: emit_lp64.c emit_lp64.exp-ln Log Message: tests/lint: test emitting 128-bit integer types for lint2 To generate a diff of this commit: cvs rdiff -u -r1.1102 -r1.1103 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.101 -r1.102 src/tests/usr.bin/xlint/lint1/Makefile cvs rdiff -u -r1.3 -r1.4 src/tests/usr.bin/xlint/lint1/accept.sh cvs rdiff -u -r0 -r1.1 src/tests/usr.bin/xlint/lint1/emit_lp64.c \ src/tests/usr.bin/xlint/lint1/emit_lp64.exp-ln Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.1102 src/distrib/sets/lists/tests/mi:1.1103 --- src/distrib/sets/lists/tests/mi:1.1102 Tue Aug 3 20:34:23 2021 +++ src/distrib/sets/lists/tests/mi Thu Aug 5 06:34:42 2021 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.1102 2021/08/03 20:34:23 rillig Exp $ +# $NetBSD: mi,v 1.1103 2021/08/05 06:34:42 rillig Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -6236,6 +6236,8 @@ ./usr/tests/usr.bin/xlint/lint1/emit.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/emit.exp-ln tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/emit.ln tests-obsolete obsolete +./usr/tests/usr.bin/xlint/lint1/emit_lp64.c tests-usr.bin-tests compattestfile,atf +./usr/tests/usr.bin/xlint/lint1/emit_lp64.exp-ln tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/expr_binary.c tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/expr_binary.exp tests-usr.bin-tests compattestfile,atf ./usr/tests/usr.bin/xlint/lint1/expr_binary_trad.c tests-usr.bin-tests compattestfile,atf Index: src/tests/usr.bin/xlint/lint1/Makefile diff -u src/tests/usr.bin/xlint/lint1/Makefile:1.101 src/tests/usr.bin/xlint/lint1/Makefile:1.102 --- src/tests/usr.bin/xlint/lint1/Makefile:1.101 Tue Aug 3 20:34:23 2021 +++ src/tests/usr.bin/xlint/lint1/Makefile Thu Aug 5 06:34:43 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.101 2021/08/03 20:34:23 rillig Exp $ +# $NetBSD: Makefile,v 1.102 2021/08/05 06:34:43 rillig Exp $ NOMAN= # defined MAX_MESSAGE= 345 # see lint1/err.c @@ -131,6 +131,8 @@ FILES+= decl_struct_member.exp FILES+= emit.c FILES+= emit.exp FILES+= emit.exp-ln +FILES+= emit_lp64.c +FILES+= emit_lp64.exp-ln FILES+= expr_binary.c FILES+= expr_binary.exp FILES+= expr_binary_trad.c Index: src/tests/usr.bin/xlint/lint1/accept.sh diff -u src/tests/usr.bin/xlint/lint1/accept.sh:1.3 src/tests/usr.bin/xlint/lint1/accept.sh:1.4 --- src/tests/usr.bin/xlint/lint1/accept.sh:1.3 Sun Jul 11 14:43:57 2021 +++ src/tests/usr.bin/xlint/lint1/accept.sh Thu Aug 5 06:34:43 2021 @@ -1,5 +1,5 @@ #! /bin/sh -# $NetBSD: accept.sh,v 1.3 2021/07/11 14:43:57 rillig Exp $ +# $NetBSD: accept.sh,v 1.4 2021/08/05 06:34:43 rillig Exp $ # # Copyright (c) 2021 The NetBSD Foundation, Inc. # All rights reserved. @@ -41,7 +41,7 @@ for pattern in "$@"; do cfile="$base.c" expfile="$base.exp" tmpfile="$base.exp.tmp" - ln_file="$base.ln" + ln_file="$base.exp-ln" configure_test_case "$cfile" # shellcheck disable=SC2154 Added files: Index: src/tests/usr.bin/xlint/lint1/emit_lp64.c diff -u /dev/null src/tests/usr.bin/xlint/lint1/emit_lp64.c:1.1 --- /dev/null Thu Aug 5 06:34:43 2021 +++ src/tests/usr.bin/xlint/lint1/emit_lp64.c Thu Aug 5 06:34:43 2021 @@ -0,0 +1,19 @@ +/* $NetBSD: emit_lp64.c,v 1.1 2021/08/05 06:34:43 rillig Exp $ */ +# 3 "emit_lp64.c" + +/* + * Test the symbol information that lint1 writes to a .ln file. Using this + * symbol information, lint2 later checks that the symbols are used + * consistently across different translation units. + * + * This test covers large integer types that are only supported on LP64 + * platforms. + */ + +// omit the option '-g' to avoid having the GCC builtins in the .ln file. +/* lint1-flags: -Sw */ + +/* lint1-only-if: lp64 */ + +__int128_t int128(__int128_t); +__uint128_t uint128(__uint128_t); Index: src/tests/usr.bin/xlint/lint1/emit_lp64.exp-ln diff -u /dev/null src/tests/usr.bin/xlint/lint1/emit_lp64.exp-ln:1.1 --- /dev/null Thu Aug 5 06:34:43 2021 +++ src/tests/usr.bin/xlint/lint1/emit_lp64.exp-ln Thu Aug 5 06:34:43 2021 @@ -0,0 +1,4 @@ +0semit_lp64.c +Semit_lp64.c +18d0.18e6int128F1JJ +19d0.19e7uint128F1uJuJ