From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C02D3857362; Wed, 18 May 2022 23:38:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C02D3857362 From: "mckelvey at maskull dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/105651] New: Failure compiling constexpr/__builtin_memcpy on Cygwin with -std=c++20 Date: Wed, 18 May 2022 23:38:47 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mckelvey at maskull dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone attachments.created Message-ID: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 May 2022 23:38:47 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105651 Bug ID: 105651 Summary: Failure compiling constexpr/__builtin_memcpy on Cygwin with -std=3Dc++20 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: mckelvey at maskull dot com Target Milestone: --- Created attachment 52990 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=3D52990&action=3Dedit Build.log showing error $ /usr/local/bin/g++ -v Using built-in specs. COLLECT_GCC=3D/usr/local/bin/g++ COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc/x86_64-pc-cygwin/13.0.0/lto-wr= apper.exe Target: x86_64-pc-cygwin Configured with: ./configure --enable-languages=3Dc,c++ --enable-threads=3D= posix Thread model: posix Supported LTO compression algorithms: zlib gcc version 13.0.0 20220515 (experimental) (GCC) $ uname CYGWIN_NT-10.0 Windows 10. Builds on gcc-11,12,13 with -std=3Dc++17, but all three fail with c++20. In file included from /usr/local/include/c++/13.0.0/string:40, from /usr/local/include/c++/13.0.0/bits/locale_classes.h:4= 0, from /usr/local/include/c++/13.0.0/locale:39, from Types.h:36, from PatternDriverTop.h:42, from PatternDriverTop.cc:28: In static member function =E2=80=98static constexpr std::char_traits:= :char_type* std::char_traits::copy(char_type*, const char_type*, std::size_t)=E2= =80=99, inlined from =E2=80=98static void std::basic_string<_CharT, _Traits, _Alloc>::_M_copy(_CharT*, const _CharT*, size_type) [with _CharT =3D char; _Traits =3D std::char_traits; _Alloc =3D std::allocator]=E2=80= =99 at /usr/local/include/c++/13.0.0/bits/cow_string.h:402:21, inlined from =E2=80=98std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*, size_type) [with _CharT =3D char; _Traits =3D std::char_traits; _Allo= c =3D std::allocator]=E2=80=99 at /usr/local/include/c++/13.0.0/bits/cow_string.h:3297:16, inlined from =E2=80=98std::basic_string<_CharT, _Traits, _Alloc>& std::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*) [with _CharT =3D char; _Traits =3D std::char_traits; _Alloc =3D std::allocator]=E2=80=99 at /usr/local/include/c++/13.0.0/bits/cow_string.h:1609:21, inlined from =E2=80=98PatternDriver::pdstring PatternDriver::_printable_by_ctype(const pdstring&, const std::locale&, con= st pdctype&, bool, bool)=E2=80=99 at PatternDriverTop.cc:589:22: /usr/local/include/c++/13.0.0/bits/char_traits.h:431:56: error: =E2=80=98vo= id* __builtin_memcpy(void*, const void*, long unsigned int)=E2=80=99 accessing 9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1= may overlap up to 9223372036854775813 bytes at offset -3 [-Werror=3Drestrict] 431 | return static_cast(__builtin_memcpy(__s1, __s2, __n)); |=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ cc1plus: all warnings being treated as errors=