diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-11-22 09:53:36 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-11-22 10:24:54 +0000 |
commit | 0f9659e770304d3c44cfa0e793833a461bc487aa (patch) | |
tree | bcad4b942c97308a515e88b6138eff398de31aad /libcpp | |
parent | 09b7993ab6d93716f77c03ff9a9165fa4b579f0d (diff) | |
download | gcc-0f9659e770304d3c44cfa0e793833a461bc487aa.zip gcc-0f9659e770304d3c44cfa0e793833a461bc487aa.tar.gz gcc-0f9659e770304d3c44cfa0e793833a461bc487aa.tar.bz2 |
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.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions