https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87963
Bug ID: 87963 Summary: libstdc++-v3/src/c++17/memory_resource.cc:515:31: error: static assertion failed for mingw-w64 target since r265853 Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: mateuszb at poczta dot onet.pl Target Milestone: --- When I build cross compiler (trunk) for mingw-w64 x86_64 target (long is 4-bytes, pointer is 8-bytes), there are errors since r265853 libtool: compile: /home/ma/m/build/bc_gcc/./gcc/xgcc -shared-libgcc -B/home/ma/m/build/bc_gcc/./gcc -nostdinc++ -L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/src -L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/src/.libs -L/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/libsupc++/.libs -L/home/ma/m/cross/x86_64-w64-mingw32/lib -L/home/ma/m/cross/mingw/lib -isystem /home/ma/m/cross/x86_64-w64-mingw32/include -isystem /home/ma/m/cross/mingw/include -B/home/ma/m/cross/x86_64-w64-mingw32/bin/ -B/home/ma/m/cross/x86_64-w64-mingw32/lib/ -isystem /home/ma/m/cross/x86_64-w64-mingw32/include -isystem /home/ma/m/cross/x86_64-w64-mingw32/sys-include -I/home/ma/m/source/gcc-9/libstdc++-v3/../libgcc -I/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/include/x86_64-w64-mingw32 -I/home/ma/m/build/bc_gcc/x86_64-w64-mingw32/libstdc++-v3/include -I/home/ma/m/source/gcc-9/libstdc++-v3/libsupc++ -std=gnu++17 -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -frandom-seed=memory_resource.lo -g -O2 -fimplicit-templates -c /home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc -o memory_resource.o /home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:515:31: error: static assertion failed 515 | static_assert(sizeof(chunk) == (4 * sizeof(void*)), ""); | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~ /home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:526:48: warning: left shift count >= width of type [-Wshift-count-overflow] 526 | static constexpr size_t all_ones = (1ul << _S_sizebits) - 1u; | ^~~~~~~~~~~ /home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:526:45: error: right operand of shift expression '(1 << 58)' is >= than the precision of the left operand [-fpermissive] 526 | static constexpr size_t all_ones = (1ul << _S_sizebits) - 1u; | ~~~~~^~~~~~~~~~~~~~~ /home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc: In member function 'std::size_t std::pmr::{anonymous}::big_block::size() const': /home/ma/m/source/gcc-9/libstdc++-v3/src/c++17/memory_resource.cc:548:5: warning: control reaches end of non-void function [-Wreturn-type] 548 | } | ^ Makefile:735: recipe for target 'memory_resource.lo' failed make[4]: *** [memory_resource.lo] Error 1