From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1734) id 2E09C3858037; Tue, 7 Dec 2021 21:10:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2E09C3858037 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Marek Polacek To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-5828] c++: Fix decltype-bitfield1.C on i?86 X-Act-Checkin: gcc X-Git-Author: Marek Polacek X-Git-Refname: refs/heads/trunk X-Git-Oldrev: 4394fd67264f5de650c2c3509c001c5f7203449d X-Git-Newrev: cf2cd61dce4f5f0cf9d72328396e7f949db18ddb Message-Id: <20211207211016.2E09C3858037@sourceware.org> Date: Tue, 7 Dec 2021 21:10:16 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Dec 2021 21:10:16 -0000 https://gcc.gnu.org/g:cf2cd61dce4f5f0cf9d72328396e7f949db18ddb commit r12-5828-gcf2cd61dce4f5f0cf9d72328396e7f949db18ddb Author: Marek Polacek Date: Tue Dec 7 16:06:19 2021 -0500 c++: Fix decltype-bitfield1.C on i?86 This test was failing on i?86 because of: warning: width of 'A::l' exceeds its type so change the type to 'long long' and make the test run only on arches where sizeof(long long) == 8 to avoid failing like this again. gcc/testsuite/ChangeLog: * g++.dg/cpp0x/decltype-bitfield1.C: Change a type to unsigned long long. Only run on longlong64 targets. Diff: --- gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C | 48 ++++++++++++------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C b/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C index 2d8d8e81bff..27289fb8580 100644 --- a/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C +++ b/gcc/testsuite/g++.dg/cpp0x/decltype-bitfield1.C @@ -1,5 +1,5 @@ // PR c++/95009 -// { dg-do compile { target c++11 } } +// { dg-do compile { target { c++11 && longlong64 } } } struct false_type { static constexpr bool value = false; }; struct true_type { static constexpr bool value = true; }; @@ -10,7 +10,7 @@ struct is_same : true_type {}; struct A { int i : 31; - unsigned long l : 37; + unsigned long long l : 37; } a; void @@ -40,26 +40,26 @@ g () static_assert (is_same::value, ""); static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); - static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); + static_assert (is_same::value, ""); }