From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E6F0B3858C54; Tue, 22 Nov 2022 09:08:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E6F0B3858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1669108123; bh=pQ8gzTTR592wP9Ks0prbgLKLjDw8NWVy7p/kbEr7FUc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=K/BO1ujgVTFd2FlXl/LwsCsNFoaQnVD2VmAui1C4Qsf9g5AhMoJhcfqcr8XOEl36j K/Jln8Ez3vF32N2yKfBTiAWn8/5l4biqWCGxxKTSyxlRW2dHQkjBThr/q8GbbL6Eey djMT6Nlti0DGZuKVON6cnwmV//DBMdhx6V3ZVQ7w= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/107801] Building cross compiler for H8 family fails in libstdc++ (c++17/memory_resource.cc) Date: Tue, 22 Nov 2022 09:08:40 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 12.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: everconfirmed bug_status cf_reconfirmed_on Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D107801 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Last reconfirmed| |2022-11-22 --- Comment #1 from Jonathan Wakely --- Looks like your size_t is 32 bits though, which is why that code doesn't wo= rk. On msp430-elf size_t is width 20, so those constants are not used. This should fix it: --- a/libstdc++-v3/src/c++17/memory_resource.cc +++ b/libstdc++-v3/src/c++17/memory_resource.cc @@ -876,9 +876,9 @@ namespace pmr 1024, 1536, 2048, 3072, #if __SIZE_WIDTH__ > 20 - 1<<12, 1<<13, 1<<14, - 1<<15, 1<<16, 1<<17, - 1<<20, 1<<21, 1<<22 // 4MB should be enough for anybody + 1lu<<12, 1lu<<13, 1lu<<14, + 1lu<<15, 1lu<<16, 1lu<<17, + 1lu<<20, 1lu<<21, 1lu<<22 // 4MB should be enough for anybody #endif #endif };=