public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97533] New: ICE encountering operator() within lambda expression within templated struct
@ 2020-10-22 18:47 harry at mccleave dot ca
  2020-10-23  6:06 ` [Bug c++/97533] " rguenth at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: harry at mccleave dot ca @ 2020-10-22 18:47 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97533
           Summary: ICE encountering operator() within lambda expression
                    within templated struct
           Product: gcc
           Version: 10.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: harry at mccleave dot ca
  Target Milestone: ---

gcc version: 10.2
options: /std:c++17
Issue: internal compiler error
godbolt link: https://godbolt.org/z/W4GGnE
reduced code that replicates:
template<typename T>
struct Blah
{
  void operator()(int& a,int& b) {
    [this](auto&... args) {
      (operator()(args),...);
    }(a, b);
  }
};

int main() {
  Blah<void> proc;
  int a, b;
  proc(a, b);
}

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

* [Bug c++/97533] ICE encountering operator() within lambda expression within templated struct
  2020-10-22 18:47 [Bug c++/97533] New: ICE encountering operator() within lambda expression within templated struct harry at mccleave dot ca
@ 2020-10-23  6:06 ` rguenth at gcc dot gnu.org
  2020-10-26 16:23 ` mpolacek at gcc dot gnu.org
  2021-04-27 16:26 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-23  6:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
clang rejects it

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

* [Bug c++/97533] ICE encountering operator() within lambda expression within templated struct
  2020-10-22 18:47 [Bug c++/97533] New: ICE encountering operator() within lambda expression within templated struct harry at mccleave dot ca
  2020-10-23  6:06 ` [Bug c++/97533] " rguenth at gcc dot gnu.org
@ 2020-10-26 16:23 ` mpolacek at gcc dot gnu.org
  2021-04-27 16:26 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-10-26 16:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mpolacek at gcc dot gnu.org
   Target Milestone|---                         |8.5
   Last reconfirmed|                            |2020-10-26
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with

commit 88b811bd29063036fd4536ee1312b1269cade6ed
Author: Jason Merrill <jason@redhat.com>
Date:   Tue Aug 29 17:38:21 2017 -0400

    PR c++/81236 - ICE with template-id in generic lambda

            * semantics.c (finish_id_expression): Remove special dependent
case.
            Avoid some later pieces when dependent.
            (finish_qualified_id_expr): Do normal BASELINK handling in a
            template.  Always build a SCOPE_REF for a destructor BIT_NOT_EXPR.
            (parsing_default_capturing_generic_lambda_in_template): Remove.
            * parser.c (cp_parser_postfix_dot_deref_expression): Always give an
            error for types that will never be complete.
            * mangle.c (write_expression): Add sanity check.
            * tree.c (build_qualified_name): Add sanity check.
            (cp_walk_subtrees): Walk into the class context of a BASELINK.
            * lambda.c (add_capture): Improve diagnostic for generic lambda
            capture failure.
            * call.c (build_new_method_call_1): Print the right constructor
            name.

    From-SVN: r251438

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

* [Bug c++/97533] ICE encountering operator() within lambda expression within templated struct
  2020-10-22 18:47 [Bug c++/97533] New: ICE encountering operator() within lambda expression within templated struct harry at mccleave dot ca
  2020-10-23  6:06 ` [Bug c++/97533] " rguenth at gcc dot gnu.org
  2020-10-26 16:23 ` mpolacek at gcc dot gnu.org
@ 2021-04-27 16:26 ` mpolacek at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-04-27 16:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed by r11-7418.

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

end of thread, other threads:[~2021-04-27 16:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-22 18:47 [Bug c++/97533] New: ICE encountering operator() within lambda expression within templated struct harry at mccleave dot ca
2020-10-23  6:06 ` [Bug c++/97533] " rguenth at gcc dot gnu.org
2020-10-26 16:23 ` mpolacek at gcc dot gnu.org
2021-04-27 16:26 ` mpolacek 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).