public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/109666] New: Segmentation fault with std::array using gcc 13
@ 2023-04-28 11:41 john.viklund at effnet dot com
  2023-04-28 12:18 ` [Bug c++/109666] [13/14 Regression] " redi at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: john.viklund at effnet dot com @ 2023-04-28 11:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 109666
           Summary: Segmentation fault with std::array using gcc 13
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: john.viklund at effnet dot com
  Target Milestone: ---

Created attachment 54951
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=54951&action=edit
Preprocessed source

gcc (GCC) 13.0.1 20230401 (Red Hat 13.0.1-0) running on Fedora 38

Compiled with:
/usr/bin/gcc -std=c++20 -O3 -c foo.cc

Gives the following output:
foo.cc: In instantiation of ‘Bar<T>::Bar() [with T = Foo]’:
foo.cc:19:23:   required from here
foo.cc:14:20: internal compiler error: Segmentation fault
   14 |   std::array<T, 1> a_{};
      |                    ^~
Please submit a full bug report, with preprocessed source.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/cci1GNGP.out file, please attach this to
your bugreport.

Was also able to reproduce it using godbolt on gcc 13.1:
https://godbolt.org/z/7nK446P34

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
@ 2023-04-28 12:18 ` redi at gcc dot gnu.org
  2023-04-28 12:22 ` redi at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2023-04-28 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
      Known to fail|                            |13.1.0, 14.0
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |13.2
            Summary|Segmentation fault with     |[13/14 Regression]
                   |std::array using gcc 13     |Segmentation fault with
                   |                            |std::array using gcc 13
   Last reconfirmed|                            |2023-04-28
      Known to work|                            |12.2.0

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
  2023-04-28 12:18 ` [Bug c++/109666] [13/14 Regression] " redi at gcc dot gnu.org
@ 2023-04-28 12:22 ` redi at gcc dot gnu.org
  2023-04-28 14:20 ` mpolacek at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: redi at gcc dot gnu.org @ 2023-04-28 12:22 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Started with r13-6788 "c++: DMI in template with virtual base [PR106890]"

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
  2023-04-28 12:18 ` [Bug c++/109666] [13/14 Regression] " redi at gcc dot gnu.org
  2023-04-28 12:22 ` redi at gcc dot gnu.org
@ 2023-04-28 14:20 ` mpolacek at gcc dot gnu.org
  2023-04-28 14:21 ` mpolacek at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-04-28 14:20 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlosgalvezp at gmail dot com

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 109669 has been marked as a duplicate of this bug. ***

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (2 preceding siblings ...)
  2023-04-28 14:20 ` mpolacek at gcc dot gnu.org
@ 2023-04-28 14:21 ` mpolacek at gcc dot gnu.org
  2023-05-01 14:25 ` [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788 jason at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-04-28 14:21 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Another test:

#include <array>

template <typename T, std::size_t n>
struct Point
{
 private:
    T value_[n]{};
};

struct Edge
{
    Point<float, 3> start{};
    Point<float, 3> end{};
};

template <typename T, std::size_t n>
class StaticVector
{
 public:
    static StaticVector create()
    {
        StaticVector output;
        return output;
    }

 private:
    std::array<T, n> data{};
};

class Polygon
{
 public:
    using Edges = StaticVector<Edge, 3>;
    Edges edges() const
    {
        auto edges = Edges::create();
        return edges;
    }
};

void foo()
{
    Polygon polygon{};
    auto const edges = polygon.edges();
}

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (3 preceding siblings ...)
  2023-04-28 14:21 ` mpolacek at gcc dot gnu.org
@ 2023-05-01 14:25 ` jason at gcc dot gnu.org
  2023-05-01 20:55 ` cvs-commit at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jason at gcc dot gnu.org @ 2023-05-01 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |jason at gcc dot gnu.org

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (4 preceding siblings ...)
  2023-05-01 14:25 ` [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788 jason at gcc dot gnu.org
@ 2023-05-01 20:55 ` cvs-commit at gcc dot gnu.org
  2023-05-02  7:19 ` carlosgalvezp at gmail dot com
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-01 20:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Jason Merrill <jason@gcc.gnu.org>:

https://gcc.gnu.org/g:07c52d1eec9671af92b7ce977b469f13a87887ad

commit r14-386-g07c52d1eec9671af92b7ce977b469f13a87887ad
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 1 10:57:20 2023 -0400

    c++: array DMI and member fn [PR109666]

    Here it turns out I also needed to adjust cfun when stepping out of the
    member function to instantiate the DMI.  But instead of adding that tweak,
    let's unify with instantiate_body and just push_to_top_level instead of
    trying to do the minimum subset of it.  There was no measurable change in
    compile time on stdc++.h.

    This should also resolve 109506 without yet another tweak.

            PR c++/109666

    gcc/cp/ChangeLog:

            * name-lookup.cc (maybe_push_to_top_level)
            (maybe_pop_from_top_level): Split out...
            * pt.cc (instantiate_body): ...from here.
            * init.cc (maybe_instantiate_nsdmi_init): Use them.
            * name-lookup.h: Declare them..

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-array2.C: New test.

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (5 preceding siblings ...)
  2023-05-01 20:55 ` cvs-commit at gcc dot gnu.org
@ 2023-05-02  7:19 ` carlosgalvezp at gmail dot com
  2023-05-02 20:25 ` cvs-commit at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: carlosgalvezp at gmail dot com @ 2023-05-02  7:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Carlos Galvez <carlosgalvezp at gmail dot com> ---
This commit fixes all the ICEs on our side, thank you!

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (6 preceding siblings ...)
  2023-05-02  7:19 ` carlosgalvezp at gmail dot com
@ 2023-05-02 20:25 ` cvs-commit at gcc dot gnu.org
  2023-05-03 17:11 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-02 20:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:0a2c771910e888c9a26db319122230144789b9bf

commit r13-7278-g0a2c771910e888c9a26db319122230144789b9bf
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 1 10:57:20 2023 -0400

    c++: array DMI and member fn [PR109666]

    Here it turns out I also needed to adjust cfun when stepping out of the
    member function to instantiate the DMI.  But instead of adding that tweak,
    let's unify with instantiate_body and just push_to_top_level instead of
    trying to do the minimum subset of it.  There was no measurable change in
    compile time on stdc++.h.

    This should also resolve 109506 without yet another tweak.

            PR c++/109666

    gcc/cp/ChangeLog:

            * name-lookup.cc (maybe_push_to_top_level)
            (maybe_pop_from_top_level): Split out...
            * pt.cc (instantiate_body): ...from here.
            * init.cc (maybe_instantiate_nsdmi_init): Use them.
            * name-lookup.h: Declare them..

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-array2.C: New test.

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

* [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (7 preceding siblings ...)
  2023-05-02 20:25 ` cvs-commit at gcc dot gnu.org
@ 2023-05-03 17:11 ` jason at gcc dot gnu.org
  2023-05-04 14:30 ` [Bug c++/109666] [12 Regression] Segmentation fault with std::array jason at gcc dot gnu.org
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jason at gcc dot gnu.org @ 2023-05-03 17:11 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 13.2/14.

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (8 preceding siblings ...)
  2023-05-03 17:11 ` jason at gcc dot gnu.org
@ 2023-05-04 14:30 ` jason at gcc dot gnu.org
  2023-05-04 14:48 ` cvs-commit at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jason at gcc dot gnu.org @ 2023-05-04 14:30 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
            Summary|[13/14 Regression]          |[12 Regression]
                   |Segmentation fault with     |Segmentation fault with
                   |std::array using gcc 13     |std::array
                   |since r13-6788              |
             Status|RESOLVED                    |ASSIGNED
           Priority|P3                          |P1
            Version|13.0                        |12.3.0
   Target Milestone|13.2                        |12.3

--- Comment #8 from Jason Merrill <jason at gcc dot gnu.org> ---
This is also broken on the 12 branch since r12-9441-g94569d91bd4c60

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (9 preceding siblings ...)
  2023-05-04 14:30 ` [Bug c++/109666] [12 Regression] Segmentation fault with std::array jason at gcc dot gnu.org
@ 2023-05-04 14:48 ` cvs-commit at gcc dot gnu.org
  2023-05-04 20:04 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-05-04 14:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:13a269a015f888a0001af7b9ab564fadbee4a808

commit r12-9511-g13a269a015f888a0001af7b9ab564fadbee4a808
Author: Jason Merrill <jason@redhat.com>
Date:   Thu May 4 10:26:25 2023 -0400

    Revert "c++: DMI in template with virtual base [PR106890]"

    The PR106890 patch caused PR109666; for 12.3 let's just revert it.

            PR c++/109666

    This reverts commit 94569d91bd4c604da755b4aae84256e7fe21196a.

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (10 preceding siblings ...)
  2023-05-04 14:48 ` cvs-commit at gcc dot gnu.org
@ 2023-05-04 20:04 ` pinskia at gcc dot gnu.org
  2023-05-08 12:27 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-05-04 20:04 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |tocic at protonmail dot ch

--- Comment #10 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 109730 has been marked as a duplicate of this bug. ***

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (11 preceding siblings ...)
  2023-05-04 20:04 ` pinskia at gcc dot gnu.org
@ 2023-05-08 12:27 ` rguenth at gcc dot gnu.org
  2023-05-08 12:44 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:27 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|12.3                        |12.4

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 12.3 is being released, retargeting bugs to GCC 12.4.

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (12 preceding siblings ...)
  2023-05-08 12:27 ` rguenth at gcc dot gnu.org
@ 2023-05-08 12:44 ` rguenth at gcc dot gnu.org
  2023-05-09 11:30 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-05-08 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #12 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (13 preceding siblings ...)
  2023-05-08 12:44 ` rguenth at gcc dot gnu.org
@ 2023-05-09 11:30 ` marxin at gcc dot gnu.org
  2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
  2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: marxin at gcc dot gnu.org @ 2023-05-09 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fiesh at zefix dot tv

--- Comment #13 from Martin Liška <marxin at gcc dot gnu.org> ---
*** Bug 109785 has been marked as a duplicate of this bug. ***

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (14 preceding siblings ...)
  2023-05-09 11:30 ` marxin at gcc dot gnu.org
@ 2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
  2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-08-11 21:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:c4212c41daa8584c0e63862a709d03da0c7f3dee

commit r12-9811-gc4212c41daa8584c0e63862a709d03da0c7f3dee
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 1 10:57:20 2023 -0400

    c++: array DMI and member fn [PR109666]

    Here it turns out I also needed to adjust cfun when stepping out of the
    member function to instantiate the DMI.  But instead of adding that tweak,
    let's unify with instantiate_body and just push_to_top_level instead of
    trying to do the minimum subset of it.  There was no measurable change in
    compile time on stdc++.h.

    This should also resolve 109506 without yet another tweak.

            PR c++/106890
            PR c++/109666

    gcc/cp/ChangeLog:

            * name-lookup.cc (maybe_push_to_top_level)
            (maybe_pop_from_top_level): Split out...
            * pt.cc (instantiate_body): ...from here.
            * init.cc (maybe_instantiate_nsdmi_init): Use them.
            * name-lookup.h: Declare them..

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-array2.C: New test.
            * g++.dg/cpp0x/nsdmi-template25.C: New test.

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

* [Bug c++/109666] [12 Regression] Segmentation fault with std::array
  2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
                   ` (15 preceding siblings ...)
  2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
@ 2023-09-11 22:11 ` cvs-commit at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-09-11 22:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:0d7e5f90597167c36c7816f5bcf689472e8b1940

commit r11-10982-g0d7e5f90597167c36c7816f5bcf689472e8b1940
Author: Jason Merrill <jason@redhat.com>
Date:   Mon May 1 10:57:20 2023 -0400

    c++: array DMI and member fn [PR109666]

    Here it turns out I also needed to adjust cfun when stepping out of the
    member function to instantiate the DMI.  But instead of adding that tweak,
    let's unify with instantiate_body and just push_to_top_level instead of
    trying to do the minimum subset of it.  There was no measurable change in
    compile time on stdc++.h.

    This should also resolve 109506 without yet another tweak.

            PR c++/106890
            PR c++/109666

    gcc/cp/ChangeLog:

            * name-lookup.c (maybe_push_to_top_level)
            (maybe_pop_from_top_level): Split out...
            * pt.c (instantiate_body): ...from here.
            * init.c (maybe_instantiate_nsdmi_init): Use them.
            * name-lookup.h: Declare them..

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/nsdmi-array2.C: New test.
            * g++.dg/cpp0x/nsdmi-template25.C: New test.

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

end of thread, other threads:[~2023-09-11 22:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-28 11:41 [Bug c++/109666] New: Segmentation fault with std::array using gcc 13 john.viklund at effnet dot com
2023-04-28 12:18 ` [Bug c++/109666] [13/14 Regression] " redi at gcc dot gnu.org
2023-04-28 12:22 ` redi at gcc dot gnu.org
2023-04-28 14:20 ` mpolacek at gcc dot gnu.org
2023-04-28 14:21 ` mpolacek at gcc dot gnu.org
2023-05-01 14:25 ` [Bug c++/109666] [13/14 Regression] Segmentation fault with std::array using gcc 13 since r13-6788 jason at gcc dot gnu.org
2023-05-01 20:55 ` cvs-commit at gcc dot gnu.org
2023-05-02  7:19 ` carlosgalvezp at gmail dot com
2023-05-02 20:25 ` cvs-commit at gcc dot gnu.org
2023-05-03 17:11 ` jason at gcc dot gnu.org
2023-05-04 14:30 ` [Bug c++/109666] [12 Regression] Segmentation fault with std::array jason at gcc dot gnu.org
2023-05-04 14:48 ` cvs-commit at gcc dot gnu.org
2023-05-04 20:04 ` pinskia at gcc dot gnu.org
2023-05-08 12:27 ` rguenth at gcc dot gnu.org
2023-05-08 12:44 ` rguenth at gcc dot gnu.org
2023-05-09 11:30 ` marxin at gcc dot gnu.org
2023-08-11 21:21 ` cvs-commit at gcc dot gnu.org
2023-09-11 22:11 ` cvs-commit 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).