public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hp@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r13-5633] libstdc++ testsuite: Correct S0 in std/time/hh_mm_ss/1.cc Date: Wed, 1 Feb 2023 16:58:59 +0000 (GMT) [thread overview] Message-ID: <20230201165859.A9B3C3858D33@sourceware.org> (raw) https://gcc.gnu.org/g:a939dd835798efd40b78f7c0070177616e3f36d3 commit r13-5633-ga939dd835798efd40b78f7c0070177616e3f36d3 Author: Hans-Peter Nilsson <hp@axis.com> Date: Wed Feb 1 14:56:47 2023 +0100 libstdc++ testsuite: Correct S0 in std/time/hh_mm_ss/1.cc 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<seconds>. PR testsuite/108632 * testsuite/std/time/hh_mm_ss/1.cc (size): Add empty struct at end of S0. Diff: --- 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 d97a9057f47..f8a3e115af3 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<seconds>) == sizeof(S0)); struct S1 { long long h; char m; char s; bool neg; char ss; }; static_assert(sizeof(hh_mm_ss<duration<int, std::centi>>) == sizeof(S1));
reply other threads:[~2023-02-01 16:58 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20230201165859.A9B3C3858D33@sourceware.org \ --to=hp@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ --cc=libstdc++-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).