From patchwork Fri Sep 27 06:00:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathaniel Shead X-Patchwork-Id: 1990103 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=ZJ5NF8dr; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XFKZb1PYtz1xt8 for ; Fri, 27 Sep 2024 16:00:39 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6435B385C6CB for ; Fri, 27 Sep 2024 06:00:37 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by sourceware.org (Postfix) with ESMTPS id A2515385843B for ; Fri, 27 Sep 2024 06:00:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A2515385843B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org A2515385843B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::102f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727416817; cv=none; b=OLaP706qBu3jfNNr2XtuOaapVrgLcTp9yLliOD12mY4X2v+9mfRxTEykdA26HAhpAB4bxNsEc3ZVUNRSF+e6IaRqzhRfzzfWXau4nwXznlbh9b8d7xFZwwVQ9XeedGUbALFem3BTKWgvaqnrp7mHmBIq5KVIzLlH5Kmrb6hynpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1727416817; c=relaxed/simple; bh=wThSclN4GL+RXMfDXWvOw3h65zo1wHniMZsjH+DAvuc=; h=DKIM-Signature:Message-ID:Date:From:To:Subject:MIME-Version; b=CMvAr7Zk0z22tsD0qV67BcoOWfQvRAQ3H4lbt7owwG7CJdhZukJukHqSNb0QKoVxR4+bvayQNEGYJStC2fOW0J/rhSze59DEs2layIAmwealo5yqyzQXME9YEavlq4A8VTXTq+TyEUTo9vMFcjx5lipHrsFJrZQbkY5Ntarvol8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2da516e6940so355014a91.3 for ; Thu, 26 Sep 2024 23:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1727416807; x=1728021607; darn=gcc.gnu.org; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=bCOwE9PfBRR7GIvCKBHdJEv8kx5xPZOOHJ+dbQFVlHU=; b=ZJ5NF8drVBRL1A+Gn+va+qM9vL9JH71+G3CMudDyUsiEbehsbp9t4ygYngmkpDhH3u Wr6KPhHtgGu9a8OGIoa9wByTU6TJZdhuL9RcXeShqtE4WhvZvX7vwIYhI+BBGT3LSp2c AdfqFeUSJRM+K1o5n2/9QQo2+iMauQJzeRbu4Tn4hKNMw72WIQmkYMXU2069hvVauuhy T0tOxDz1VL4ZSPxD5NMqQSCHhtESiYeGbqTj1WdG5IaMVhYrkBXXMADxvWSTkNBYf9kz 01c25pbEKxz2QR3sTifIf/xLtMg86Sexy7iCdcPUlUYNMciVqICvBt0gaTWYI4Dr9BJi yl2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727416807; x=1728021607; h=in-reply-to:content-disposition:mime-version:references:subject:cc :to:from:date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bCOwE9PfBRR7GIvCKBHdJEv8kx5xPZOOHJ+dbQFVlHU=; b=bRBxHyUyz0j6hTl3ugOsbmFwlqKq66vBmXa/39SHzzI2KXjzeVsX4ObcyMmqPrQ+41 12BkjGOOQBLQmaBGve90CdALbD6xCUfjGwMWhqtLFDG9zwM2egCUAmL98DhhtbyQ0qUC eYCYIZgfIMkGhbUzwSaseZIyl0rXG8v+E6gvywzDvXG30OVQLmCZYlWYMrCVNIkFLbJb FXSV5qJUHMeRboqCVi8krncApUoqajC1V10TsUw5emXv60wVyhBLmsZ1c12CfDJRy3UC pFlxRbLKV7PTwWy/wpIIwzgTN3rNuTYmUCelJ9FLSofIbUDAi/p/+v9MJjAzrwF2eT50 A0IA== X-Gm-Message-State: AOJu0YyC3X1tQWYY6Uh/R5Ng4GVohx66uIQwjbKyIlp3PnEY4lswVIDu qo4cJU8CyyK7BCXDKihgluOt0QK3UArpdLBEuWnT4EMSJJYxXHSSStv+Kg== X-Google-Smtp-Source: AGHT+IGTvLB8KRcex9zZew1BLQBPUNgARwqpQtsPxWNqZTXhtUAjZ1oYdAJ68jNOxfULazkaDTuQSA== X-Received: by 2002:a17:902:d2c3:b0:205:76f3:fc13 with SMTP id d9443c01a7336-20b36ad9b61mr14114915ad.7.1727416806093; Thu, 26 Sep 2024 23:00:06 -0700 (PDT) Received: from Thaum. (163-47-68-2.ipv4.originbroadband.com.au. [163.47.68.2]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-20b37d913c4sm7004585ad.88.2024.09.26.23.00.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Sep 2024 23:00:05 -0700 (PDT) Message-ID: <66f649e5.170a0220.1308b0.3e86@mx.google.com> X-Google-Original-Message-ID: Date: Fri, 27 Sep 2024 16:00:01 +1000 From: Nathaniel Shead To: gcc-patches@gcc.gnu.org Cc: Jason Merrill , Nathan Sidwell Subject: [PATCH v2 6/6] c++/modules: Add testcase for standard-library exposures [PR115126] References: <66f64939.050a0220.261230.4b66@mx.google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <66f64939.050a0220.261230.4b66@mx.google.com> X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Bootstrapped and regtested on x86_64-pc-linux-gnu and aarch64-unknown-linux-gnu, OK for trunk? -- >8 -- This adds a new xtreme-header testcase to ensure that we have no regressions with regards to exposures of TU-local declarations in the standard library header files. A more restrictive test would be to do 'export extern "C++"' here, but unfortunately the system headers on some targets declare TU-local entities, so we'll make do with checking that at least the C++ standard library headers don't refer to such entities. PR c++/115126 gcc/testsuite/ChangeLog: * g++.dg/modules/xtreme-header-8.C: New test. Signed-off-by: Nathaniel Shead --- gcc/testsuite/g++.dg/modules/xtreme-header-8.C | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 gcc/testsuite/g++.dg/modules/xtreme-header-8.C diff --git a/gcc/testsuite/g++.dg/modules/xtreme-header-8.C b/gcc/testsuite/g++.dg/modules/xtreme-header-8.C new file mode 100644 index 00000000000..9da4e01cc68 --- /dev/null +++ b/gcc/testsuite/g++.dg/modules/xtreme-header-8.C @@ -0,0 +1,8 @@ +// PR c++/115126 +// { dg-additional-options "-fmodules-ts -Wignored-exposures" } +// { dg-module-cmi xstd } + +export module xstd; +extern "C++" { + #include "xtreme-header.h" +}