public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/105651] New: Failure compiling constexpr/__builtin_memcpy on Cygwin with -std=c++20
@ 2022-05-18 23:38 mckelvey at maskull dot com
  2022-05-18 23:41 ` [Bug c++/105651] " mckelvey at maskull dot com
                   ` (26 more replies)
  0 siblings, 27 replies; 28+ messages in thread
From: mckelvey at maskull dot com @ 2022-05-18 23:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105651

            Bug ID: 105651
           Summary: Failure compiling constexpr/__builtin_memcpy on Cygwin
                    with -std=c++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=52990&action=edit
Build.log showing error

$ /usr/local/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-cygwin/13.0.0/lto-wrapper.exe
Target: x86_64-pc-cygwin
Configured with: ./configure --enable-languages=c,c++ --enable-threads=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=c++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:40,
                 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 ‘static constexpr std::char_traits<char>::char_type*
std::char_traits<char>::copy(char_type*, const char_type*, std::size_t)’,
    inlined from ‘static void std::basic_string<_CharT, _Traits,
_Alloc>::_M_copy(_CharT*, const _CharT*, size_type) [with _CharT = char;
_Traits = std::char_traits<char>; _Alloc = std::allocator<char>]’ at
/usr/local/include/c++/13.0.0/bits/cow_string.h:402:21,
    inlined from ‘std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*,
size_type) [with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
std::allocator<char>]’ at
/usr/local/include/c++/13.0.0/bits/cow_string.h:3297:16,
    inlined from ‘std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::insert(size_type, const _CharT*)
[with _CharT = char; _Traits = std::char_traits<char>; _Alloc =
std::allocator<char>]’ at
/usr/local/include/c++/13.0.0/bits/cow_string.h:1609:21,
    inlined from ‘PatternDriver::pdstring
PatternDriver::_printable_by_ctype(const pdstring&, const std::locale&, const
pdctype&, bool, bool)’ at PatternDriverTop.cc:589:22:
/usr/local/include/c++/13.0.0/bits/char_traits.h:431:56: error: ‘void*
__builtin_memcpy(void*, const void*, long unsigned int)’ accessing
9223372036854775810 or more bytes at offsets [2, 9223372036854775807] and 1 may
overlap up to 9223372036854775813 bytes at offset -3 [-Werror=restrict]
  431 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2,
__n));
      |                                       
~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2023-06-21 12:22 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 23:38 [Bug c++/105651] New: Failure compiling constexpr/__builtin_memcpy on Cygwin with -std=c++20 mckelvey at maskull dot com
2022-05-18 23:41 ` [Bug c++/105651] " mckelvey at maskull dot com
2022-05-19  0:10 ` [Bug tree-optimization/105651] bogus "may overlap" memcpy warning with std::string pinskia at gcc dot gnu.org
2022-05-19  6:19 ` rguenth at gcc dot gnu.org
2022-05-24 17:48 ` mckelvey at maskull dot com
2022-06-07 14:58 ` jens.maurer at gmx dot net
2022-06-21 17:33 ` pinskia at gcc dot gnu.org
2022-06-21 17:34 ` [Bug tree-optimization/105651] [12/13 Regression] " pinskia at gcc dot gnu.org
2022-06-21 17:38 ` pinskia at gcc dot gnu.org
2022-07-08 11:56 ` [Bug tree-optimization/105651] [12/13 Regression] bogus "may overlap" memcpy warning with std::string and operator+ at -O3 marxin at gcc dot gnu.org
2022-07-19 23:10 ` pinskia at gcc dot gnu.org
2022-07-26  9:57 ` rguenth at gcc dot gnu.org
2022-07-26 10:16 ` redi at gcc dot gnu.org
2022-07-26 10:20 ` jakub at gcc dot gnu.org
2022-07-26 10:36 ` redi at gcc dot gnu.org
2022-07-26 10:46 ` rguenther at suse dot de
2022-07-26 12:19 ` rguenth at gcc dot gnu.org
2022-08-03  9:57 ` redi at gcc dot gnu.org
2022-10-19 10:11 ` rguenth at gcc dot gnu.org
2022-10-19 10:48 ` redi at gcc dot gnu.org
2022-10-19 11:08 ` [Bug tree-optimization/105651] [12 " rguenth at gcc dot gnu.org
2022-12-12 10:24 ` rguenth at gcc dot gnu.org
2023-02-13 11:32 ` jg at jguk dot org
2023-04-20  4:44 ` pinskia at gcc dot gnu.org
2023-04-20 12:00 ` redi at gcc dot gnu.org
2023-05-08 12:24 ` rguenth at gcc dot gnu.org
2023-06-21 12:18 ` cvs-commit at gcc dot gnu.org
2023-06-21 12:22 ` redi 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).