public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/94560] New: ICE on recursive templated alias
@ 2020-04-11 10:56 pacoarjonilla at yahoo dot es
  2020-04-11 14:59 ` [Bug c++/94560] " mpolacek at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pacoarjonilla at yahoo dot es @ 2020-04-11 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94560
           Summary: ICE on recursive templated alias
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pacoarjonilla at yahoo dot es
  Target Milestone: ---

Maybe related to Bug ID 93085

Only on GCC10 with --std=c++17 and --std=c++20

ICE with tuples and variants. Could not replicate with my own types.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

#include <tuple>

template <typename T>
using B = std::tuple<T*>;

using A = std::tuple<B<A>>;

int main()
{
    B b;
}

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Compiler output:

prueba.cc:6:24: error: ‘A’ was not declared in this scope
    6 | using A = std::tuple<B<A>>;
      |                        ^
prueba.cc:6:24: error: template argument 1 is invalid
prueba.cc:6:25: error: template argument 1 is invalid
    6 | using A = std::tuple<B<A>>;
      |                         ^~
prueba.cc:6:16: error: ‘<expression error>’ in namespace ‘std’ does not name a
type
    6 | using A = std::tuple<B<A>>;
      |                ^~~~~~~~~~~
prueba.cc: In function ‘int main()’:
prueba.cc:10:7: internal compiler error: in alias_ctad_tweaks, at cp/pt.c:28319
   10 |     B b;
      |       ^
0x674f3f alias_ctad_tweaks
        /home/paco/git/gcc/gcc/cp/pt.c:28319
0x674f3f deduction_guides_for
        /home/paco/git/gcc/gcc/cp/pt.c:28491
0x9f5ccb do_class_deduction
        /home/paco/git/gcc/gcc/cp/pt.c:28596
0x9f5ccb do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        /home/paco/git/gcc/gcc/cp/pt.c:28725
0x929e5c cp_finish_decl(tree_node*, tree_node*, bool, tree_node*, int)
        /home/paco/git/gcc/gcc/cp/decl.c:7503
0x9d0f69 cp_parser_init_declarator
        /home/paco/git/gcc/gcc/cp/parser.c:20906
0x9b2422 cp_parser_simple_declaration
        /home/paco/git/gcc/gcc/cp/parser.c:13731
0x9b418a cp_parser_declaration_statement
        /home/paco/git/gcc/gcc/cp/parser.c:13163
0x9b4e0d cp_parser_statement
        /home/paco/git/gcc/gcc/cp/parser.c:11469
0x9b5d38 cp_parser_statement_seq_opt
        /home/paco/git/gcc/gcc/cp/parser.c:11835
0x9b5e18 cp_parser_compound_statement
        /home/paco/git/gcc/gcc/cp/parser.c:11785
0x9cd1b5 cp_parser_function_body
        /home/paco/git/gcc/gcc/cp/parser.c:23059
0x9cd1b5 cp_parser_ctor_initializer_opt_and_function_body
        /home/paco/git/gcc/gcc/cp/parser.c:23110
0x9d050d cp_parser_function_definition_after_declarator
        /home/paco/git/gcc/gcc/cp/parser.c:28958
0x9d1589 cp_parser_function_definition_from_specifiers_and_declarator
        /home/paco/git/gcc/gcc/cp/parser.c:28874
0x9d1589 cp_parser_init_declarator
        /home/paco/git/gcc/gcc/cp/parser.c:20666
0x9b2422 cp_parser_simple_declaration
        /home/paco/git/gcc/gcc/cp/parser.c:13731
0x9db752 cp_parser_declaration
        /home/paco/git/gcc/gcc/cp/parser.c:13430
0x9dbeda cp_parser_translation_unit
        /home/paco/git/gcc/gcc/cp/parser.c:4731
0x9dbeda c_parse_file()
        /home/paco/git/gcc/gcc/cp/parser.c:43829
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

* [Bug c++/94560] ICE on recursive templated alias
  2020-04-11 10:56 [Bug c++/94560] New: ICE on recursive templated alias pacoarjonilla at yahoo dot es
@ 2020-04-11 14:59 ` mpolacek at gcc dot gnu.org
  2020-04-20 16:46 ` mpolacek at gcc dot gnu.org
  2021-04-14 14:57 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-04-11 14:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-04-11
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |ice-on-invalid-code
                 CC|                            |mpolacek at gcc dot gnu.org

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Confirmed but looks invalid.

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

* [Bug c++/94560] ICE on recursive templated alias
  2020-04-11 10:56 [Bug c++/94560] New: ICE on recursive templated alias pacoarjonilla at yahoo dot es
  2020-04-11 14:59 ` [Bug c++/94560] " mpolacek at gcc dot gnu.org
@ 2020-04-20 16:46 ` mpolacek at gcc dot gnu.org
  2021-04-14 14:57 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-04-20 16:46 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
This ICE is the same as the second test in bug 93085.

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

* [Bug c++/94560] ICE on recursive templated alias
  2020-04-11 10:56 [Bug c++/94560] New: ICE on recursive templated alias pacoarjonilla at yahoo dot es
  2020-04-11 14:59 ` [Bug c++/94560] " mpolacek at gcc dot gnu.org
  2020-04-20 16:46 ` mpolacek at gcc dot gnu.org
@ 2021-04-14 14:57 ` ppalka at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2021-04-14 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
                 CC|                            |ppalka at gcc dot gnu.org
             Status|NEW                         |RESOLVED

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Dup of PR99180.

*** This bug has been marked as a duplicate of bug 99180 ***

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

end of thread, other threads:[~2021-04-14 14:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-11 10:56 [Bug c++/94560] New: ICE on recursive templated alias pacoarjonilla at yahoo dot es
2020-04-11 14:59 ` [Bug c++/94560] " mpolacek at gcc dot gnu.org
2020-04-20 16:46 ` mpolacek at gcc dot gnu.org
2021-04-14 14:57 ` 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).