public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110078] New: [13 regression] Excessive memory usage constructing std::variant from a high-index alternative.
@ 2023-06-01 11:37 toojays at toojays dot net
  2023-06-01 11:54 ` [Bug c++/110078] " redi at gcc dot gnu.org
  2023-06-01 11:54 ` redi at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: toojays at toojays dot net @ 2023-06-01 11:37 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110078
           Summary: [13 regression] Excessive memory usage constructing
                    std::variant from a high-index alternative.
           Product: gcc
           Version: 13.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: toojays at toojays dot net
  Target Milestone: ---

Created attachment 55233
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=55233&action=edit
Reproducer demonstrating excessive memory use constructing std::variant from a
high-index alternative.

The attached source contains a function which constructs a std::variant<29
alternatives> from the 29th alternative. Attempting to compile it with GCC 13.1
results in cc1plus consuming more than 20GiB of memory before being killed. GCC
12.2.0 is able to compile it promptly with no apparent problems.

$ g++-13 -v
Using built-in specs.
COLLECT_GCC=/opt/acacia/3rd-party/gcc-13.1.0-1/bin/g++
COLLECT_LTO_WRAPPER=/opt/acacia/3rd-party/gcc-13.1.0-1/libexec/gcc/x86_64-pc-linux-gnu/13.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /docker-20.04-build/extract/gcc-13.1.0/configure
--prefix=/opt/acacia/3rd-party/gcc-13.1.0-1
CPPFLAGS=-I/opt/acacia/3rd-party/gcc-13.1.0-1/include CFLAGS='-O2 -g
-fno-omit-frame-pointer' CXXFLAGS='-O2 -g -fno-omit-frame-pointer'
--enable-languages=c,c++,d --disable-multilib --with-system-zlib
--enable-checking=release --program-prefix= --program-suffix=
--with-gmp=/opt/acacia/3rd-party/gcc-13.1.0-1
--with-mpfr=/opt/acacia/3rd-party/gcc-13.1.0-1
--with-mpc=/opt/acacia/3rd-party/gcc-13.1.0-1
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.0 (GCC)

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

* [Bug c++/110078] [13 regression] Excessive memory usage constructing std::variant from a high-index alternative.
  2023-06-01 11:37 [Bug c++/110078] New: [13 regression] Excessive memory usage constructing std::variant from a high-index alternative toojays at toojays dot net
@ 2023-06-01 11:54 ` redi at gcc dot gnu.org
  2023-06-01 11:54 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-01 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Already fixed by r14-409-g4b8d0d4d7fd245

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

* [Bug c++/110078] [13 regression] Excessive memory usage constructing std::variant from a high-index alternative.
  2023-06-01 11:37 [Bug c++/110078] New: [13 regression] Excessive memory usage constructing std::variant from a high-index alternative toojays at toojays dot net
  2023-06-01 11:54 ` [Bug c++/110078] " redi at gcc dot gnu.org
@ 2023-06-01 11:54 ` redi at gcc dot gnu.org
  1 sibling, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2023-06-01 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Making this a dup of PR 109678

*** This bug has been marked as a duplicate of bug 109678 ***

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

end of thread, other threads:[~2023-06-01 11:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-01 11:37 [Bug c++/110078] New: [13 regression] Excessive memory usage constructing std::variant from a high-index alternative toojays at toojays dot net
2023-06-01 11:54 ` [Bug c++/110078] " redi at gcc dot gnu.org
2023-06-01 11:54 ` 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).