From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6053F3857034; Tue, 16 May 2023 12:50:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6053F3857034 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1684241449; bh=sAUj3KMCllFGSXlz7qSCyzkSFlxBmBGHXfdkh+Xp/iA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=bfecSsPJ6mw8w2H3UMpVi2I5xXoUrKKzuE5VNsIhgG6p3qSYOHxMk9La9eTT/HwAv xeEM45GHDijZ3v129hQjibBupeaL/0v96Y8wfOXPQySUZg7oG+NA8DhqvpKV65Q/tH zbUgEwtzSXYB4vA0mnaMt9HI6vsa7kRLws6Uka2g= From: "cvs-commit 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, 16 May 2023 12:50:47 +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: build X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit 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: 11.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: 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 --- Comment #18 from CVS Commits --- The releases/gcc-11 branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:047c0fae82ca1458339e7e9724d125d30b685898 commit r11-10776-g047c0fae82ca1458339e7e9724d125d30b685898 Author: Jonathan Wakely Date: Tue Nov 22 09:53:36 2022 +0000 libstdc++: Fix pool resource build errors for H8 [PR107801] The array of pool sizes was previously adjusted to work for msp430-elf which has 16-bit int and either 16-bit size_t or 20-bit size_t. The largest pool sizes were disabled unless size_t has more than 20 bits. The H8 family has 16-bit int but 32-bit size_t, which means that the largest sizes are enabled, but 1<<15 produces a negative number that then cannot be narrowed to size_t. Replace the test for 32-bit size_t with a test for 32-bit int, which means we won't use the 4kiB to 4MiB pools for targets with 16-bit int even if they have a wider size_t. libstdc++-v3/ChangeLog: PR libstdc++/107801 * src/c++17/memory_resource.cc (pool_sizes): Disable large pools for targets with 16-bit int. (cherry picked from commit 0f9659e770304d3c44cfa0e793833a461bc487aa)=