public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745
@ 2021-04-09 17:42 hewillk at gmail dot com
  2021-04-09 17:43 ` [Bug c++/100006] " hewillk at gmail dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: hewillk at gmail dot com @ 2021-04-09 17:42 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100006
           Summary: ICE: in dependent_type_p, at cp/pt.c:26745
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hewillk at gmail dot com
  Target Milestone: ---

Congratulations on hitting the 10,000 reports mark!

https://godbolt.org/z/dhPqd4595

template <class... Ts>
auto f(Ts...) {
  [] { enum class e : Ts {}; };
}

int main() {
  f(0, true);
}

<source>:3:19: internal compiler error: in dependent_type_p, at cp/pt.c:26745
    3 |   [] { enum class e : Ts {}; };
      |                   ^
0x1d00959 internal_error(char const*, ...)
        ???:0
0x6bb099 fancy_abort(char const*, int, char const*)
        ???:0
0x8fa338 dependent_type_p(tree_node*)
        ???:0
0x78b617 start_enum(tree_node*, tree_node*, tree_node*, tree_node*, bool,
bool*)
        ???:0
0x92ae1d lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        ???:0
0x91766d tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x917717 tsubst(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x94abba tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x91d54f instantiate_decl(tree_node*, bool, bool)
        ???:0
0x7c7a3e maybe_instantiate_decl(tree_node*)
        ???:0
0x7c91a0 mark_used(tree_node*, int)
        ???:0
0x6de907 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ???:0
0x981c3c finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ???:0
0x8e224d c_parse_file()
        ???:0
0xa612e2 c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.

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

* [Bug c++/100006] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
@ 2021-04-09 17:43 ` hewillk at gmail dot com
  2021-04-09 17:47 ` [Bug c++/100006] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hewillk at gmail dot com @ 2021-04-09 17:43 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from 康桓瑋 <hewillk at gmail dot com> ---
(In reply to 康桓瑋 from comment #0)
> Congratulations on hitting the 10,000 reports mark!
> 
> https://godbolt.org/z/dhPqd4595
> 
> template <class... Ts>
> auto f(Ts...) {
>   [] { enum class e : Ts {}; };
> }
> 
> int main() {
>   f(0, true);
> }
> 
> <source>:3:19: internal compiler error: in dependent_type_p, at cp/pt.c:26745
>     3 |   [] { enum class e : Ts {}; };
>       |                   ^
> 0x1d00959 internal_error(char const*, ...)
> 	???:0
> 0x6bb099 fancy_abort(char const*, int, char const*)
> 	???:0
> 0x8fa338 dependent_type_p(tree_node*)
> 	???:0
> 0x78b617 start_enum(tree_node*, tree_node*, tree_node*, tree_node*, bool,
> bool*)
> 	???:0
> 0x92ae1d lookup_template_class(tree_node*, tree_node*, tree_node*,
> tree_node*, int, int)
> 	???:0
> 0x91766d tsubst(tree_node*, tree_node*, int, tree_node*)
> 	???:0
> 0x917717 tsubst(tree_node*, tree_node*, int, tree_node*)
> 	???:0
> 0x94abba tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
> 	???:0
> 0x91d54f instantiate_decl(tree_node*, bool, bool)
> 	???:0
> 0x7c7a3e maybe_instantiate_decl(tree_node*)
> 	???:0
> 0x7c91a0 mark_used(tree_node*, int)
> 	???:0
> 0x6de907 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
> vl_embed>**, int)
> 	???:0
> 0x981c3c finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**,
> bool, bool, int)
> 	???:0
> 0x8e224d c_parse_file()
> 	???:0
> 0xa612e2 c_common_parse_file()
> 	???:0
> Please submit a full bug report,
> with preprocessed source if appropriate.

100,000

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

* [Bug c++/100006] [8/9/10/11 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
  2021-04-09 17:43 ` [Bug c++/100006] " hewillk at gmail dot com
@ 2021-04-09 17:47 ` mpolacek at gcc dot gnu.org
  2021-04-09 17:51 ` hewillk at gmail dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-04-09 17:47 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2021-04-09
           Keywords|                            |ice-on-invalid-code
   Target Milestone|---                         |8.5
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P2
     Ever confirmed|0                           |1
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org
            Summary|ICE: in dependent_type_p,   |[8/9/10/11 Regression] ICE:
                   |at cp/pt.c:26745            |in dependent_type_p, at
                   |                            |cp/pt.c:26745

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
(In reply to 康桓瑋 from comment #0)
> Congratulations on hitting the 10,000 reports mark!

You helped :).

Started with r251433.

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

* [Bug c++/100006] [8/9/10/11 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
  2021-04-09 17:43 ` [Bug c++/100006] " hewillk at gmail dot com
  2021-04-09 17:47 ` [Bug c++/100006] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
@ 2021-04-09 17:51 ` hewillk at gmail dot com
  2021-04-09 20:43 ` jason at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: hewillk at gmail dot com @ 2021-04-09 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from 康桓瑋 <hewillk at gmail dot com> ---
https://godbolt.org/z/o6h8GP6ae

Maybe same form:

template <class... Ts>
auto f() {
  [] { struct S : Ts {}; };
}

int main() {
  f<>();
}

<source>:3:15: internal compiler error: in dependent_type_p, at cp/pt.c:26745
    3 |   [] { struct S : Ts {}; };
      |               ^
0x1d00959 internal_error(char const*, ...)
        ???:0
0x6bb099 fancy_abort(char const*, int, char const*)
        ???:0
0x8fa338 dependent_type_p(tree_node*)
        ???:0
0x7a9464 xref_basetypes(tree_node*, tree_node*)
        ???:0
0x95aa80 instantiate_class_template(tree_node*)
        ???:0
0x94abba tsubst_lambda_expr(tree_node*, tree_node*, int, tree_node*)
        ???:0
0x91d54f instantiate_decl(tree_node*, bool, bool)
        ???:0
0x7c7a3e maybe_instantiate_decl(tree_node*)
        ???:0
0x7c91a0 mark_used(tree_node*, int)
        ???:0
0x6de907 build_new_function_call(tree_node*, vec<tree_node*, va_gc,
vl_embed>**, int)
        ???:0
0x981c3c finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ???:0
0x8e224d c_parse_file()
        ???:0
0xa612e2 c_common_parse_file()
        ???:0
Please submit a full bug report,
with preprocessed source if appropriate.

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

* [Bug c++/100006] [8/9/10/11 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (2 preceding siblings ...)
  2021-04-09 17:51 ` hewillk at gmail dot com
@ 2021-04-09 20:43 ` jason at gcc dot gnu.org
  2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-09 20:43 UTC (permalink / raw)
  To: gcc-bugs

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

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++/100006] [8/9/10/11 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (3 preceding siblings ...)
  2021-04-09 20:43 ` jason at gcc dot gnu.org
@ 2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
  2021-05-14  9:54 ` [Bug c++/100006] [9/10 " jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-10  4:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:e89055f90cff9fb6f565b9374e1ab74f805682fb

commit r11-8103-ge89055f90cff9fb6f565b9374e1ab74f805682fb
Author: Jason Merrill <jason@redhat.com>
Date:   Fri Apr 9 16:43:50 2021 -0400

    c++: pack in base-specifier in lambda [PR100006]

    Normally cp_parser_base_clause prevents unexpanded packs, but in a lambda
    check_for_bare_parameter_packs allows it.  Then we weren't finding the
    pack when scanning the lambda body.

    This doesn't fix a valid variant like

      template <class... Ts> void sink (Ts&&...);
      template <class... Ts>
      void f() {
        sink ([] { struct S : Ts { }; }...);
      }
      int main() {
        f<int>();
      }

    but that's a much bigger project.

    gcc/cp/ChangeLog:

            PR c++/100006
            * pt.c (find_parameter_packs_r) [TAG_DEFN]: Look into bases.

    gcc/testsuite/ChangeLog:

            PR c++/100006
            * g++.dg/cpp0x/lambda/lambda-variadic13.C: New test.

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

* [Bug c++/100006] [9/10 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (4 preceding siblings ...)
  2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
@ 2021-05-14  9:54 ` jakub at gcc dot gnu.org
  2021-06-01  8:20 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-14  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 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++/100006] [9/10 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (5 preceding siblings ...)
  2021-05-14  9:54 ` [Bug c++/100006] [9/10 " jakub at gcc dot gnu.org
@ 2021-06-01  8:20 ` rguenth at gcc dot gnu.org
  2022-05-27  9:44 ` [Bug c++/100006] [10 " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 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++/100006] [10 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (6 preceding siblings ...)
  2021-06-01  8:20 ` rguenth at gcc dot gnu.org
@ 2022-05-27  9:44 ` rguenth at gcc dot gnu.org
  2022-06-28 10:44 ` jakub at gcc dot gnu.org
  2023-07-07  9:32 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #7 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++/100006] [10 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (7 preceding siblings ...)
  2022-05-27  9:44 ` [Bug c++/100006] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:44 ` jakub at gcc dot gnu.org
  2023-07-07  9:32 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:44 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #8 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++/100006] [10 Regression] ICE: in dependent_type_p, at cp/pt.c:26745
  2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
                   ` (8 preceding siblings ...)
  2022-06-28 10:44 ` jakub at gcc dot gnu.org
@ 2023-07-07  9:32 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|10.5                        |11.0
         Resolution|---                         |FIXED
      Known to fail|                            |10.5.0

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.

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

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

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-09 17:42 [Bug c++/100006] New: ICE: in dependent_type_p, at cp/pt.c:26745 hewillk at gmail dot com
2021-04-09 17:43 ` [Bug c++/100006] " hewillk at gmail dot com
2021-04-09 17:47 ` [Bug c++/100006] [8/9/10/11 Regression] " mpolacek at gcc dot gnu.org
2021-04-09 17:51 ` hewillk at gmail dot com
2021-04-09 20:43 ` jason at gcc dot gnu.org
2021-04-10  4:07 ` cvs-commit at gcc dot gnu.org
2021-05-14  9:54 ` [Bug c++/100006] [9/10 " jakub at gcc dot gnu.org
2021-06-01  8:20 ` rguenth at gcc dot gnu.org
2022-05-27  9:44 ` [Bug c++/100006] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:44 ` jakub at gcc dot gnu.org
2023-07-07  9:32 ` rguenth 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).