From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by sourceware.org (Postfix) with ESMTPS id 2870E3858C54; Tue, 5 Apr 2022 16:43:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 2870E3858C54 From: Hans-Peter Nilsson To: , Subject: [PATCH] libstdc++-v3 expected: Don't test ABI-variant properties in requirements.cc MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8BIT Message-ID: <20220405164329.99C9F20426@pchp3.se.axis.com> Date: Tue, 5 Apr 2022 18:43:29 +0200 X-Spam-Status: No, score=-10.8 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, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2022 16:43:32 -0000 Ok to commit? -------------- 8< -------------- Without this, for a target where alignment and structure-sizes are by default byte-aligned, such as cris-elf, you'll see, in libstdc++.log: /X/gcc/libstdc++-v3/testsuite/20_util/expected/requirements.cc:127: error: static assertion failed /X/gcc/libstdc++-v3/testsuite/20_util/expected/requirements.cc:127: note: the comparison reduces to '(5 == 2)' compiler exited with status 1 FAIL: 20_util/expected/requirements.cc (test for excess errors) Excess errors: /X/gcc/libstdc++-v3/testsuite/20_util/expected/requirements.cc:127: error: static assertion failed It seems the intent is a smoke-test and that conditionals for ABI properties are out of scope, so best to just delete this particular line. libstdc++-v3/: * testsuite/20_util/expected/requirements.cc: Don't test ABI-variant properties of expected<>. --- libstdc++-v3/testsuite/20_util/expected/requirements.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/libstdc++-v3/testsuite/20_util/expected/requirements.cc b/libstdc++-v3/testsuite/20_util/expected/requirements.cc index 485aa338679c..a51a007a4fc3 100644 --- a/libstdc++-v3/testsuite/20_util/expected/requirements.cc +++ b/libstdc++-v3/testsuite/20_util/expected/requirements.cc @@ -124,6 +124,5 @@ static_assert( move_assignable< void, G > ); // QoI properties static_assert( sizeof(std::expected) == 2 ); static_assert( sizeof(std::expected) == 2 ); -static_assert( sizeof(std::expected) == 2 * __alignof(void*) ); static_assert( alignof(std::expected) == 1 ); static_assert( alignof(std::expected) == alignof(void*) ); -- 2.30.2