public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/86355] [8/9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
@ 2021-05-03 19:01 ` ppalka at gcc dot gnu.org
  2021-05-14  9:50 ` [Bug c++/86355] [9/10/11/12 " jakub at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-05-03 19:01 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
      Known to fail|                            |5.2.0, 6.4.0
   Target Milestone|---                         |8.5
      Known to work|                            |5.1.0
            Summary|Internal compiler error     |[8/9/10/11/12 Regression]
                   |with pack expansion and     |Internal compiler error
                   |fold expression             |with pack expansion and
                   |                            |fold expression

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
A reduced valid C++11 testcase:

template <int...> struct integral_constant {
  static const int value = 1;
};
template <class... T> using mp_all = integral_constant<T::value...>;
template <class... T> using check2 = mp_all<mp_all<T...,
integral_constant<0>>>;
check2<> x;

We started ICEing on this one after r6-1487.

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

* [Bug c++/86355] [9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
  2021-05-03 19:01 ` [Bug c++/86355] [8/9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression ppalka at gcc dot gnu.org
@ 2021-05-14  9:50 ` jakub at gcc dot gnu.org
  2021-05-26 21:37 ` jason at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:50 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|8.5                         |9.4

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 8 branch is being closed.

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

* [Bug c++/86355] [9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
  2021-05-03 19:01 ` [Bug c++/86355] [8/9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression ppalka at gcc dot gnu.org
  2021-05-14  9:50 ` [Bug c++/86355] [9/10/11/12 " jakub at gcc dot gnu.org
@ 2021-05-26 21:37 ` jason at gcc dot gnu.org
  2021-05-27 17:42 ` cvs-commit at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2021-05-26 21:37 UTC (permalink / raw)
  To: gcc-bugs

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

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] 11+ messages in thread

* [Bug c++/86355] [9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2021-05-26 21:37 ` jason at gcc dot gnu.org
@ 2021-05-27 17:42 ` cvs-commit at gcc dot gnu.org
  2021-06-01  8:11 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-27 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r12-1094-gdb79713150f4f8b6ff3de81d00d92578679e0e65
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 26 17:38:42 2021 -0400

    c++: argument pack with expansion [PR86355]

    This testcase revealed that we were using PACK_EXPANSION_EXTRA_ARGS a lot
    more than necessary; use_pack_expansion_extra_args_p meant to use it in the
    case of corresponding arguments in different argument packs differing in
    whether they are pack expansions, but it was mistakenly also returning true
    for the case of a single argument pack containing both expansion and
    non-expansion elements.

    Surprisingly, just disabling that didn't lead to any regressions in the
    testsuite; it seems other changes have prevented us getting to this point
    for code that used to exercise it.  So this patch limits the check to
    arguments in the same position in the packs, and asserts that we never
    actually see a mismatch.

            PR c++/86355

    gcc/cp/ChangeLog:

            * pt.c (use_pack_expansion_extra_args_p): Don't compare
            args from the same argument pack.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/alias-decl-variadic2.C: New test.

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

* [Bug c++/86355] [9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-05-27 17:42 ` cvs-commit at gcc dot gnu.org
@ 2021-06-01  8:11 ` rguenth at gcc dot gnu.org
  2021-07-09 20:14 ` [Bug c++/86355] [9/10/11 " cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug c++/86355] [9/10/11 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2021-06-01  8:11 ` rguenth at gcc dot gnu.org
@ 2021-07-09 20:14 ` cvs-commit at gcc dot gnu.org
  2022-05-13 17:13 ` [Bug c++/86355] [9/10 " cvs-commit at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-09 20:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 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:542d90bfd802274f38637aaaffc2dd1de62c9ec6

commit r11-8714-g542d90bfd802274f38637aaaffc2dd1de62c9ec6
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 26 17:38:42 2021 -0400

    c++: argument pack with expansion [PR86355]

    This testcase revealed that we were using PACK_EXPANSION_EXTRA_ARGS a lot
    more than necessary; use_pack_expansion_extra_args_p meant to use it in the
    case of corresponding arguments in different argument packs differing in
    whether they are pack expansions, but it was mistakenly also returning true
    for the case of a single argument pack containing both expansion and
    non-expansion elements.

    Surprisingly, just disabling that didn't lead to any regressions in the
    testsuite; it seems other changes have prevented us getting to this point
    for code that used to exercise it.  So this patch limits the check to
    arguments in the same position in the packs, and asserts that we never
    actually see a mismatch.

            PR c++/86355

    gcc/cp/ChangeLog:

            * pt.c (use_pack_expansion_extra_args_p): Don't compare
            args from the same argument pack.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/alias-decl-variadic2.C: New test.

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

* [Bug c++/86355] [9/10 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2021-07-09 20:14 ` [Bug c++/86355] [9/10/11 " cvs-commit at gcc dot gnu.org
@ 2022-05-13 17:13 ` cvs-commit at gcc dot gnu.org
  2022-05-27  9:39 ` [Bug c++/86355] [10 " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-05-13 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r10-10733-gaa030fca4b7257656aa6bfe879d79a332b3c39ea
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 26 17:38:42 2021 -0400

    c++: argument pack with expansion [PR86355]

    This testcase revealed that we were using PACK_EXPANSION_EXTRA_ARGS a lot
    more than necessary; use_pack_expansion_extra_args_p meant to use it in the
    case of corresponding arguments in different argument packs differing in
    whether they are pack expansions, but it was mistakenly also returning true
    for the case of a single argument pack containing both expansion and
    non-expansion elements.

    Surprisingly, just disabling that didn't lead to any regressions in the
    testsuite; it seems other changes have prevented us getting to this point
    for code that used to exercise it.  So this patch limits the check to
    arguments in the same position in the packs, and asserts that we never
    actually see a mismatch.

            PR c++/86355

    gcc/cp/ChangeLog:

            * pt.c (use_pack_expansion_extra_args_p): Don't compare
            args from the same argument pack.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/alias-decl-variadic2.C: New test.

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

* [Bug c++/86355] [10 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2022-05-13 17:13 ` [Bug c++/86355] [9/10 " cvs-commit at gcc dot gnu.org
@ 2022-05-27  9:39 ` rguenth at gcc dot gnu.org
  2022-06-28 10:35 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |10.4

--- Comment #11 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed

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

* [Bug c++/86355] [10 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2022-05-27  9:39 ` [Bug c++/86355] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:35 ` jakub at gcc dot gnu.org
  2023-07-07  8:02 ` rguenth at gcc dot gnu.org
  2023-07-07  8:13 ` pdimov at gmail dot com
  10 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:35 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|10.4                        |10.5

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.

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

* [Bug c++/86355] [10 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2022-06-28 10:35 ` jakub at gcc dot gnu.org
@ 2023-07-07  8:02 ` rguenth at gcc dot gnu.org
  2023-07-07  8:13 ` pdimov at gmail dot com
  10 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  8:02 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|10.5                        |10.4
      Known to fail|                            |10.3.0
      Known to work|                            |10.4.0
             Status|ASSIGNED                    |RESOLVED

--- Comment #13 from Richard Biener <rguenth at gcc dot gnu.org> ---
The comment#5 testcase was fixed in GCC 10.4 but the original testcase is still
rejected everywhere:

t.C: In substitution of 'template<class V, class ... T> using check2 =
mp_all<std::is_same<V, void>, std::integral_constant<bool,
(static_cast<bool>(std::is_copy_constructible<T>::value) ... &&
static_cast<bool>(std::integral_constant<bool,
(static_cast<bool>(std::is_copy_assignable<T>::value)  && ...)>::value))> >
[with V = void; T = {int, float}]':
t.C:10:52:   required from here
t.C:6:77: error: invalid use of pack expansion expression
    6 | ass... T> using mp_all = mp_bool<(static_cast<bool>(T::value) && ...)>;
      |                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

t.C:10:62: error: template argument 1 is invalid
   10 | tatic_assert( std::is_same<check2<void, int, float>, mp_true>::value );
      |                                                             ^


we seem to track the ICE here, so fixed.

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

* [Bug c++/86355] [10 Regression] Internal compiler error with pack expansion and fold expression
       [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
                   ` (9 preceding siblings ...)
  2023-07-07  8:02 ` rguenth at gcc dot gnu.org
@ 2023-07-07  8:13 ` pdimov at gmail dot com
  10 siblings, 0 replies; 11+ messages in thread
From: pdimov at gmail dot com @ 2023-07-07  8:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Peter Dimov <pdimov at gmail dot com> ---
Should I open another bug for the failure to compile the original example?

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

end of thread, other threads:[~2023-07-07  8:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-86355-4@http.gcc.gnu.org/bugzilla/>
2021-05-03 19:01 ` [Bug c++/86355] [8/9/10/11/12 Regression] Internal compiler error with pack expansion and fold expression ppalka at gcc dot gnu.org
2021-05-14  9:50 ` [Bug c++/86355] [9/10/11/12 " jakub at gcc dot gnu.org
2021-05-26 21:37 ` jason at gcc dot gnu.org
2021-05-27 17:42 ` cvs-commit at gcc dot gnu.org
2021-06-01  8:11 ` rguenth at gcc dot gnu.org
2021-07-09 20:14 ` [Bug c++/86355] [9/10/11 " cvs-commit at gcc dot gnu.org
2022-05-13 17:13 ` [Bug c++/86355] [9/10 " cvs-commit at gcc dot gnu.org
2022-05-27  9:39 ` [Bug c++/86355] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:35 ` jakub at gcc dot gnu.org
2023-07-07  8:02 ` rguenth at gcc dot gnu.org
2023-07-07  8:13 ` pdimov at gmail dot com

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).