From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1734) id F2D113858D28; Wed, 15 Dec 2021 20:25:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2D113858D28 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 r11-9392] c++: Fix decltype-bitfield1.C on i?86 X-Act-Checkin: gcc X-Git-Author: Marek Polacek X-Git-Refname: refs/heads/releases/gcc-11 X-Git-Oldrev: d33f68865f6f71c28cfee5dfd91765e86d471ef1 X-Git-Newrev: 64b314719afa4d947a82183b8a4ba2f17befa00b Message-Id: <20211215202538.F2D113858D28@sourceware.org> Date: Wed, 15 Dec 2021 20:25:38 +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: Wed, 15 Dec 2021 20:25:39 -0000 https://gcc.gnu.org/g:64b314719afa4d947a82183b8a4ba2f17befa00b commit r11-9392-g64b314719afa4d947a82183b8a4ba2f17befa00b 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. (cherry picked from commit cf2cd61dce4f5f0cf9d72328396e7f949db18ddb) 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, ""); }