public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/107883] New: c++17/memory_resource.cc build error for H8/300 target
@ 2022-11-26 21:38 uaa at mx5 dot nisiq.net
2022-11-26 21:41 ` [Bug libstdc++/107883] " pinskia at gcc dot gnu.org
0 siblings, 1 reply; 2+ messages in thread
From: uaa at mx5 dot nisiq.net @ 2022-11-26 21:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107883
Bug ID: 107883
Summary: c++17/memory_resource.cc build error for H8/300 target
Product: gcc
Version: 12.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: uaa at mx5 dot nisiq.net
Target Milestone: ---
Created attachment 53972
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53972&action=edit
error log of memory_resource.cc
On building gcc-12.2.0 with newlib-4.1.0 (newlib and libgloss) and
binutils-2.36.1 on Debian-11.5/amd64.
gcc/config/h8300/t-h8300 is modified with:
MULTILIB_OPTIONS = ms/msx mint32
MULTILIB_DIRNAMES = h8300s h8sx int32
to disable building H8 normal mode library.
gcc configuration is:
../configure --target=h8300-unknown-elf --enable-languages=c,c++ \
--prefix=/home/uaa/h8300 --with-newlib --disable-nls --disable-libssp \
--disable-libgomp --disable-libstdcxx-pch \
--disable-libstdcxx-filesystem-ts --with-newlib --disable-wchar_t
error occurs at libstdc++-v3/src/c++17/memory_resource.cc, due to the
size of int is 16bit (H8/300 default). log is at attachment.
Here is the remedy:
--- memory_resource.cc~ 2022-08-19 17:09:55.532700260 +0900
+++ memory_resource.cc 2022-11-27 06:35:31.076329143 +0900
@@ -877,9 +877,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
+ (size_t)1<<12, (size_t)1<<13, (size_t)1<<14,
+ (size_t)1<<15, (size_t)1<<16, (size_t)1<<17,
+ (size_t)1<<20, (size_t)1<<21, (size_t)1<<22 // 4MB should be enough for
anybody
#endif
#endif
};
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/107883] c++17/memory_resource.cc build error for H8/300 target
2022-11-26 21:38 [Bug libstdc++/107883] New: c++17/memory_resource.cc build error for H8/300 target uaa at mx5 dot nisiq.net
@ 2022-11-26 21:41 ` pinskia at gcc dot gnu.org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-11-26 21:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107883
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 107801
*** This bug has been marked as a duplicate of bug 107801 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-11-26 21:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-26 21:38 [Bug libstdc++/107883] New: c++17/memory_resource.cc build error for H8/300 target uaa at mx5 dot nisiq.net
2022-11-26 21:41 ` [Bug libstdc++/107883] " pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).