public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/105838] [11/12 Regression] g++ 12.1.0 runs out of memory or time when building const std::vector of std::strings
Date: Sat, 19 Aug 2023 09:22:39 +0000	[thread overview]
Message-ID: <bug-105838-4-gMYV1wYGur@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105838-4@http.gcc.gnu.org/bugzilla/>

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

Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu.org

--- Comment #25 from Francois-Xavier Coudert <fxcoudert at gcc dot gnu.org> ---
The new test (g++.dg/tree-ssa/initlist-opt5.C) fails on darwin. The gimple dump
is like this:

void f (const char * p)
{
  const struct basic_string * retval.0;
  const struct basic_string * D.24981;
  const struct basic_string * D.24982;
  long int D.24983;
  struct allocator D.24824;
  struct initializer_list lst;
  const struct basic_string D.24980[72];

  try
    {
      lst = {};
      lst._M_len = 72;
      D.24981 = &D.24980;
      D.24982 = D.24981;
      D.24983 = 71;
      try
        {
          _4 = D.24982;
          try
            {
              std::allocator<char>::allocator (&D.24824);
              try
                {
                  std::__cxx11::basic_string<char>::basic_string (_4, "aahing",
&D.24824);
                  D.24982 = D.24982 + 32;
                  D.24983 = D.24983 + -1;
                  _5 = D.24982;
                  std::__cxx11::basic_string<char>::basic_string (_5, "aaliis",
&D.24824);
                  D.24982 = D.24982 + 32;
                  D.24983 = D.24983 + -1;
                  _6 = D.24982;
                  std::__cxx11::basic_string<char>::basic_string (_6, "aarrgh",
&D.24824);
                  D.24982 = D.24982 + 32;
                  D.24983 = D.24983 + -1;
                  _7 = D.24982;
[...]
                  std::__cxx11::basic_string<char>::basic_string (_75,
"absent", &D.24824);
                  D.24982 = D.24982 + 32;
                  D.24983 = D.24983 + -1;
                  retval.0 = D.24981;
                  D.24983 = 71;
                  lst._M_array = &D.24980;
                }
              finally
                {
                  std::allocator<char>::~allocator (&D.24824);
                }
            }
          finally
            {
              D.24824 = {CLOBBER(eol)};
            }
        }
      catch
        {
          {
            const struct basic_string * D.24984;

            if (D.24981 != 0B) goto <D.27734>; else goto <D.27735>;
            <D.27734>:
            _1 = 71 - D.24983;
            _2 = (sizetype) _1;
            _3 = _2 * 32;
            D.24984 = D.24981 + _3;
            <D.27736>:
            if (D.24984 == D.24981) goto <D.27737>; else goto <D.27738>;
            <D.27738>:
            D.24984 = D.24984 + 18446744073709551584;
            std::__cxx11::basic_string<char>::~basic_string (D.24984);
            goto <D.27736>;
            <D.27737>:
            goto <D.27739>;
            <D.27735>:
            <D.27739>:
          }
        }
      try
        {
          g (&lst);
        }
      finally
        {
          {
            const struct basic_string * D.24985;

            D.24985 = &D.24980 + 2304;
            <D.27740>:
            if (&D.24980 == D.24985) goto <D.27741>; else goto <D.27742>;
            <D.27742>:
            D.24985 = D.24985 + 18446744073709551584;
            std::__cxx11::basic_string<char>::~basic_string (D.24985);
            goto <D.27740>;
            <D.27741>:
          }
        }
    }
  finally
    {
      lst = {CLOBBER(eol)};
      D.24980 = {CLOBBER(eol)};
    }
}


__attribute__((always_inline))
void std::allocator<char>::allocator (struct allocator * const this)
{
  try
    {
      {
        std::__new_allocator<char>::__new_allocator (this);
        try
          {

          }
        catch
          {
            std::__new_allocator<char>::~__new_allocator (this);
          }
      }
    }
  catch
    {
      <<<eh_must_not_throw (terminate)>>>
    }
}


__attribute__((always_inline))
void std::__new_allocator<char>::__new_allocator (struct __new_allocator *
const this)
{
  try
    {
      {

      }
    }
  catch
    {
      <<<eh_must_not_throw (terminate)>>>
    }
}


__attribute__((always_inline))
void std::allocator<char>::~allocator (struct allocator * const this)
{
  try
    {
      {
        try
          {

          }
        finally
          {
            std::__new_allocator<char>::~__new_allocator (this);
          }
      }
    }
  catch
    {
      <<<eh_must_not_throw (terminate)>>>
    }
}


void std::__new_allocator<char>::~__new_allocator (struct __new_allocator *
const this)
{
  try
    {
      {

      }
    }
  catch
    {
      <<<eh_must_not_throw (terminate)>>>
    }
}

      parent reply	other threads:[~2023-08-19  9:22 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-03 16:22 [Bug c++/105838] New: " eisjmbjdfcukqlaely at nthrl dot com
2022-06-13 12:47 ` [Bug c++/105838] " rguenth at gcc dot gnu.org
2022-06-13 12:52 ` rguenth at gcc dot gnu.org
2022-06-14 11:56 ` rguenth at gcc dot gnu.org
2022-06-14 13:10 ` [Bug c++/105838] [10/11/12/13 Regression] " rguenth at gcc dot gnu.org
2022-06-14 13:11 ` rguenth at gcc dot gnu.org
2022-06-14 13:37 ` jakub at gcc dot gnu.org
2022-06-28 10:49 ` jakub at gcc dot gnu.org
2022-07-10 20:39 ` pinskia at gcc dot gnu.org
2022-07-11 15:43 ` luydorarko at vusra dot com
2022-12-05 17:57 ` jason at gcc dot gnu.org
2022-12-05 18:30 ` jakub at gcc dot gnu.org
2022-12-05 20:50 ` jason at gcc dot gnu.org
2022-12-05 20:58 ` jason at gcc dot gnu.org
2022-12-05 22:27 ` redi at gcc dot gnu.org
2022-12-05 22:34 ` jakub at gcc dot gnu.org
2022-12-05 23:57 ` jason at gcc dot gnu.org
2022-12-08 18:34 ` cvs-commit at gcc dot gnu.org
2022-12-08 18:41 ` cvs-commit at gcc dot gnu.org
2022-12-08 18:45 ` cvs-commit at gcc dot gnu.org
2022-12-15  5:26 ` cvs-commit at gcc dot gnu.org
2023-01-09 22:41 ` cvs-commit at gcc dot gnu.org
2023-06-02 15:01 ` [Bug c++/105838] [10/11/12/13/14 " cvs-commit at gcc dot gnu.org
2023-06-12  8:57 ` [Bug c++/105838] [10/11/12 " cvs-commit at gcc dot gnu.org
2023-07-07 10:43 ` [Bug c++/105838] [11/12 " rguenth at gcc dot gnu.org
2023-08-19  9:22 ` fxcoudert at gcc dot gnu.org [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105838-4-gMYV1wYGur@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).