public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates
       [not found] <bug-43382-4@http.gcc.gnu.org/bugzilla/>
@ 2020-04-20 22:56 ` cvs-commit at gcc dot gnu.org
  0 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-04-20 22:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

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

commit r10-7835-ga3a4f6be0c7ac1536c4d1def14217840b04dd488
Author: Patrick Palka <ppalka@redhat.com>
Date:   Mon Apr 20 18:34:00 2020 -0400

    c++: Recursive unification with packs and explicit targs [PR94628]

    This PR seems to be similar to PR c++/43382, except that the recursive call
to
    the variadic function with trailing return type in this testcase is
additionally
    given some explicit template arguments.

    In the first testcase below, when resolving the recursive call to 'select',
    fn_type_unification first substitutes in the call's explicit template
arguments
    before doing unification, and so during this substitution the template
argument
    pack for Args is incomplete.

    Since the pack is incomplete, the substitution of 'args...' in the trailing
    return type decltype(f(args...)) is handled by the unsubstituted_packs case
of
    tsubst_pack_expansion.  But the handling of this case happens _before_ we
reset
    local_specializations, and so the substitution ends up reusing the old
binding
    for 'args' from local_specializations rather than building a new one.

    This patch fixes this issue by setting up local_specializations sooner in
    tsubst_pack_expansion, before the handling of the unsubstituted_packs case.
    It also adds a new policy to local_specialization_stack so that we could
use the
    class here to conditionally replace local_specializations.

    gcc/cp/ChangeLog:

            PR c++/94628
            * cp-tree.h (lss_policy::lss_nop): New enumerator.
            * pt.c (local_specialization_stack::local_specialization_stack):
Handle
            an lss_nop policy.
            (local_specialization_stack::~local_specialization_stack):
Likewise.
            (tsubst_pack_expansion): Use a local_specialization_stack instead
of
            manually saving and restoring local_specializations.  Conditionally
            replace local_specializations sooner, before the handling of the
            unsubstituted_packs case.

    gcc/testsuite/ChangeLog:

            PR c++/94628
            * g++.dg/cpp0x/variadic179.C: New test.
            * g++.dg/cpp0x/variadic180.C: New test.

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

* [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates
  2010-03-15 20:14 [Bug c++/43382] New: Internal error on C++0x code chris at bubblescope dot net
                   ` (2 preceding siblings ...)
  2010-05-26 15:19 ` jason at gcc dot gnu dot org
@ 2010-05-26 17:15 ` jason at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-05-26 17:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jason at gcc dot gnu dot org  2010-05-26 17:15 -------
Fixed for 4.5.1.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43382


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

* [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates
  2010-03-15 20:14 [Bug c++/43382] New: Internal error on C++0x code chris at bubblescope dot net
  2010-05-26  4:59 ` [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates jason at gcc dot gnu dot org
  2010-05-26 15:00 ` jason at gcc dot gnu dot org
@ 2010-05-26 15:19 ` jason at gcc dot gnu dot org
  2010-05-26 17:15 ` jason at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-05-26 15:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jason at gcc dot gnu dot org  2010-05-26 15:19 -------
Subject: Bug 43382

Author: jason
Date: Wed May 26 15:18:46 2010
New Revision: 159875

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159875
Log:
        PR c++/43382
        * pt.c (fn_type_unification): Don't get confused by recursive
        unification.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/g++.dg/cpp0x/variadic101.C
Modified:
    branches/gcc-4_5-branch/gcc/cp/ChangeLog
    branches/gcc-4_5-branch/gcc/cp/pt.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43382


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

* [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates
  2010-03-15 20:14 [Bug c++/43382] New: Internal error on C++0x code chris at bubblescope dot net
  2010-05-26  4:59 ` [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates jason at gcc dot gnu dot org
@ 2010-05-26 15:00 ` jason at gcc dot gnu dot org
  2010-05-26 15:19 ` jason at gcc dot gnu dot org
  2010-05-26 17:15 ` jason at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-05-26 15:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2010-05-26 15:00 -------
Subject: Bug 43382

Author: jason
Date: Wed May 26 15:00:02 2010
New Revision: 159873

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=159873
Log:
        PR c++/43382
        * pt.c (fn_type_unification): Don't get confused by recursive
        unification.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/variadic101.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/pt.c
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43382


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

* [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates
  2010-03-15 20:14 [Bug c++/43382] New: Internal error on C++0x code chris at bubblescope dot net
@ 2010-05-26  4:59 ` jason at gcc dot gnu dot org
  2010-05-26 15:00 ` jason at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-05-26  4:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2010-03-16 10:27:59         |2010-05-26 04:59:29
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43382


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

end of thread, other threads:[~2020-04-20 22:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-43382-4@http.gcc.gnu.org/bugzilla/>
2020-04-20 22:56 ` [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates cvs-commit at gcc dot gnu.org
2010-03-15 20:14 [Bug c++/43382] New: Internal error on C++0x code chris at bubblescope dot net
2010-05-26  4:59 ` [Bug c++/43382] [C++0x] ICE with auto return type and variadic templates jason at gcc dot gnu dot org
2010-05-26 15:00 ` jason at gcc dot gnu dot org
2010-05-26 15:19 ` jason at gcc dot gnu dot org
2010-05-26 17:15 ` jason at gcc dot gnu dot 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).