public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/93698] ICE on concept using generic lambda
       [not found] <bug-93698-4@http.gcc.gnu.org/bugzilla/>
@ 2020-05-28 14:07 ` ppalka at gcc dot gnu.org
  2020-05-28 16:58 ` ppalka at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-28 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ivan.pogrebnyak at gmail dot com

--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
*** Bug 95324 has been marked as a duplicate of this bug. ***

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

* [Bug c++/93698] ICE on concept using generic lambda
       [not found] <bug-93698-4@http.gcc.gnu.org/bugzilla/>
  2020-05-28 14:07 ` [Bug c++/93698] ICE on concept using generic lambda ppalka at gcc dot gnu.org
@ 2020-05-28 16:58 ` ppalka at gcc dot gnu.org
  2020-05-29 13:44 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-28 16:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
      Known to fail|                            |10.0, 11.0
             Status|UNCONFIRMED                 |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
   Last reconfirmed|                            |2020-05-28
                 CC|                            |ppalka at gcc dot gnu.org

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

* [Bug c++/93698] ICE on concept using generic lambda
       [not found] <bug-93698-4@http.gcc.gnu.org/bugzilla/>
  2020-05-28 14:07 ` [Bug c++/93698] ICE on concept using generic lambda ppalka at gcc dot gnu.org
  2020-05-28 16:58 ` ppalka at gcc dot gnu.org
@ 2020-05-29 13:44 ` cvs-commit at gcc dot gnu.org
  2020-05-30  4:21 ` cvs-commit at gcc dot gnu.org
  2020-05-30  4:23 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-29 13:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:020d86db8896f088435830595640e6fc21bc64ad

commit r11-723-g020d86db8896f088435830595640e6fc21bc64ad
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri May 29 09:40:40 2020 -0400

    c++: lambdas inside constraints [PR92652]

    When parsing a constraint-expression, a requires-clause or a
    requires-expression, we temporarily increment processing_template_decl
    so that we always obtain template trees which we could later reduce via
    substitution even when not inside a template.

    But incrementing processing_template_decl when we're already inside a
    template has the unintended side effect of shifting up the template
    parameter levels of a lambda defined inside one of these constructs,
    which leads to confusion later during substitution into the lambda.

    This patch fixes this issue by incrementing processing_template_decl
    during parsing of these constructs only if it is 0.

    Passes 'make check-c++', and also tested by building cmcstl2, does this
    look OK to commit after a full bootstrap/regtest?

    gcc/cp/ChangeLog:

            PR c++/92652
            PR c++/93698
            PR c++/94128
            * parser.c (cp_parser_requires_clause_expression): Temporarily
            increment processing_template_decl only if it is 0.
            (cp_parser_constraint_expression): Likewise.
            (cp_parser_requires_expression): Likewise.

    gcc/testsuite/ChangeLog:

            PR c++/92652
            PR c++/93698
            PR c++/94128
            * g++.dg/cpp2a/concepts-lambda8.C: New test.
            * g++.dg/cpp2a/concepts-lambda9.C: New test.
            * g++.dg/cpp2a/concepts-lambda10.C: New test.

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

* [Bug c++/93698] ICE on concept using generic lambda
       [not found] <bug-93698-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-05-29 13:44 ` cvs-commit at gcc dot gnu.org
@ 2020-05-30  4:21 ` cvs-commit at gcc dot gnu.org
  2020-05-30  4:23 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-05-30  4:21 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:03c344ad180e094140be514a5e7cbaf95b5dcd2e

commit r10-8214-g03c344ad180e094140be514a5e7cbaf95b5dcd2e
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri May 29 14:17:02 2020 -0400

    c++: lambdas inside constraints [PR92652]

    When parsing a constraint-expression, a requires-clause or a
    requires-expression, we temporarily increment processing_template_decl
    so that we always obtain template trees which we could later reduce via
    substitution even when not inside a template.

    But incrementing processing_template_decl when we're already inside a
    template has the unintended side effect of shifting up the template
    parameter levels of a lambda defined inside one of these constructs,
    which leads to confusion later during substitution into the lambda.

    This patch fixes this issue by incrementing processing_template_decl
    during parsing of these constructs only if it is 0.

    gcc/cp/ChangeLog:

            PR c++/92652
            PR c++/93698
            PR c++/94128
            * parser.c (cp_parser_requires_clause_expression): Temporarily
            increment processing_template_decl only if it is 0.
            (cp_parser_constraint_expression): Likewise.
            (cp_parser_requires_expression): Likewise.

    gcc/testsuite/ChangeLog:

            PR c++/92652
            PR c++/93698
            PR c++/94128
            * g++.dg/cpp2a/concepts-lambda8.C: New test.
            * g++.dg/cpp2a/concepts-lambda9.C: New test.
            * g++.dg/cpp2a/concepts-lambda10.C: New test.

    (cherry picked from commit 020d86db8896f088435830595640e6fc21bc64ad)

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

* [Bug c++/93698] ICE on concept using generic lambda
       [not found] <bug-93698-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-05-30  4:21 ` cvs-commit at gcc dot gnu.org
@ 2020-05-30  4:23 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 5+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-05-30  4:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed for GCC 10.2+.

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

end of thread, other threads:[~2020-05-30  4:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-93698-4@http.gcc.gnu.org/bugzilla/>
2020-05-28 14:07 ` [Bug c++/93698] ICE on concept using generic lambda ppalka at gcc dot gnu.org
2020-05-28 16:58 ` ppalka at gcc dot gnu.org
2020-05-29 13:44 ` cvs-commit at gcc dot gnu.org
2020-05-30  4:21 ` cvs-commit at gcc dot gnu.org
2020-05-30  4:23 ` ppalka 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).