https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107801
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2022-11-22
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Looks like your size_t is 32 bits though, which is why that code doesn't work.
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
};