From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp2.axis.com (smtp2.axis.com [195.60.68.18]) by sourceware.org (Postfix) with ESMTPS id 5E6D13858C36; Wed, 1 Feb 2023 14:38:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5E6D13858C36 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=axis.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=axis.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1675262314; x=1706798314; h=from:to:subject:mime-version:content-transfer-encoding: message-id:date; bh=15BjiSOxVKJcYbwT4VJRZPI/VY+jkkyNY1hTPaJwVJ4=; b=ahrC5gPAa0UzUwc8m0ypyk/dVPSV0yNd02ZAxF0uNx6scxLTCBj236x8 4Yk2010T/z9JK3mXdDU6PbJrkEZGpah9Bhi298j36XlSFDhK/8WAQXjyR UfD4z7k/2BrOKGO9TC59nJCwHqZP3fKgaUiZQdKR8AFs6lW+KXPkrjeBw EcYBrL74bi0iYMEmt1kQ4ZeF4OxcSyE/lfuJn7J1eftUdBRICOA09uQqs hUbuTCKK/Otns1ChmPPSgeewxnqmrcMP+B0N0VfvJCBzMImAW+2ZvS/l9 If7T1GYdlNfTfGTY6Y7NWrmMvhFjAK059Bq3yUTx/IQyBaUVyg8KEqGK/ Q==; From: Hans-Peter Nilsson To: , Subject: [PATCH] libstdc++ testsuite: Correct S0 in std/time/hh_mm_ss/1.cc MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-ID: <20230201143831.BDA3A20423@pchp3.se.axis.com> Date: Wed, 1 Feb 2023 15:38:31 +0100 X-Spam-Status: No, score=-10.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_PASS,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 List-Id: Tested cris-elf and native x86_64-pc-linux-gnu. Ok to commit? -----8< ------ For targets where the ABI mandates structure layout that has no padding, like cris-elf, this test started failing when introduced as an add-on to the existing 1.cc, thereby effectively causing a regression in testsuite results. Adding an empty structure to S0, corresponds better to the layout of hh_mm_ss. PR testsuite/108632 * testsuite/std/time/hh_mm_ss/1.cc (size): Add empty struct at end of S0. --- libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc b/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc index d97a9057f472..26a4555576c8 100644 --- a/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc +++ b/libstdc++-v3/testsuite/std/time/hh_mm_ss/1.cc @@ -103,7 +103,7 @@ size() { using namespace std::chrono; - struct S0 { long long h; char m; char s; bool neg; }; + struct S0 { long long h; char m; char s; bool neg; struct { } empty; }; static_assert(sizeof(hh_mm_ss) == sizeof(S0)); struct S1 { long long h; char m; char s; bool neg; char ss; }; static_assert(sizeof(hh_mm_ss>) == sizeof(S1)); -- 2.30.2