Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src tests/lint: test emitting 128-bit integer types for lint2
details: https://anonhg.NetBSD.org/src/rev/011addfdd702
branches: trunk
changeset: 1022754:011addfdd702
user: rillig <rillig%NetBSD.org@localhost>
date: Thu Aug 05 06:34:42 2021 +0000
description:
tests/lint: test emitting 128-bit integer types for lint2
diffstat:
distrib/sets/lists/tests/mi | 4 +++-
tests/usr.bin/xlint/lint1/Makefile | 4 +++-
tests/usr.bin/xlint/lint1/accept.sh | 4 ++--
tests/usr.bin/xlint/lint1/emit_lp64.c | 19 +++++++++++++++++++
tests/usr.bin/xlint/lint1/emit_lp64.exp-ln | 4 ++++
5 files changed, 31 insertions(+), 4 deletions(-)
diffs (86 lines):
diff -r 1bfcc26f0a39 -r 011addfdd702 distrib/sets/lists/tests/mi
--- a/distrib/sets/lists/tests/mi Thu Aug 05 00:16:36 2021 +0000
+++ b/distrib/sets/lists/tests/mi Thu Aug 05 06:34:42 2021 +0000
@@ -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
diff -r 1bfcc26f0a39 -r 011addfdd702 tests/usr.bin/xlint/lint1/Makefile
--- a/tests/usr.bin/xlint/lint1/Makefile Thu Aug 05 00:16:36 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/Makefile Thu Aug 05 06:34:42 2021 +0000
@@ -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+= 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
diff -r 1bfcc26f0a39 -r 011addfdd702 tests/usr.bin/xlint/lint1/accept.sh
--- a/tests/usr.bin/xlint/lint1/accept.sh Thu Aug 05 00:16:36 2021 +0000
+++ b/tests/usr.bin/xlint/lint1/accept.sh Thu Aug 05 06:34:42 2021 +0000
@@ -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 @@
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
diff -r 1bfcc26f0a39 -r 011addfdd702 tests/usr.bin/xlint/lint1/emit_lp64.c
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/emit_lp64.c Thu Aug 05 06:34:42 2021 +0000
@@ -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);
diff -r 1bfcc26f0a39 -r 011addfdd702 tests/usr.bin/xlint/lint1/emit_lp64.exp-ln
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/usr.bin/xlint/lint1/emit_lp64.exp-ln Thu Aug 05 06:34:42 2021 +0000
@@ -0,0 +1,4 @@
+0semit_lp64.c
+Semit_lp64.c
+18d0.18e6int128F1JJ
+19d0.19e7uint128F1uJuJ
Home |
Main Index |
Thread Index |
Old Index