public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets
@ 2020-05-16  2:55 pacoarjonilla at yahoo dot es
  2020-05-16  3:16 ` [Bug c++/95159] " pacoarjonilla at yahoo dot es
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: pacoarjonilla at yahoo dot es @ 2020-05-16  2:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95159
           Summary: ICE on aggregate template parameter with empty angle
                    brackets
           Product: gcc
           Version: 10.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pacoarjonilla at yahoo dot es
  Target Milestone: ---

The following snippet triggers an ICE when compiled with --std=c++20 on GCC
10.0.1

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

template <int L> struct A {
    A(const char (&)[L]) { }
};

template <A a> struct B { };

template <A a> void fu(B<a<>>) { }


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


Compiler output:

bug.cc:7:27: internal compiler error: Segmentation fault
    7 | template <A a> void fu(B<a<>>) { }
      |                           ^
0xc4dc7f crash_signal
        /home/paco/git/gcc/gcc/toplev.c:328
0x62e613 resolve_args(vec<tree_node*, va_gc, vl_embed>*, int)
        /home/paco/git/gcc/gcc/cp/call.c:4455
0x743b6e do_class_deduction
        /home/paco/git/gcc/gcc/cp/pt.c:28787
0x743b6e do_auto_deduction(tree_node*, tree_node*, tree_node*, int,
auto_deduction_context, tree_node*, int)
        /home/paco/git/gcc/gcc/cp/pt.c:28920
0x744ff2 convert_template_argument
        /home/paco/git/gcc/gcc/cp/pt.c:8395
0x757e9f convert_template_argument
        /home/paco/git/gcc/gcc/cp/pt.c:8168
0x757e9f coerce_template_parms
        /home/paco/git/gcc/gcc/cp/pt.c:8899
0x75a681 lookup_template_class_1
        /home/paco/git/gcc/gcc/cp/pt.c:9737
0x75b8cc lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
        /home/paco/git/gcc/gcc/cp/pt.c:10109
0x77808d finish_template_type(tree_node*, tree_node*, int)
        /home/paco/git/gcc/gcc/cp/semantics.c:3408
0x71fbdd cp_parser_template_id
        /home/paco/git/gcc/gcc/cp/parser.c:16734
0x71fe4c cp_parser_class_name
        /home/paco/git/gcc/gcc/cp/parser.c:23697
0x71cb81 cp_parser_qualifying_entity
        /home/paco/git/gcc/gcc/cp/parser.c:6776
0x71cb81 cp_parser_nested_name_specifier_opt
        /home/paco/git/gcc/gcc/cp/parser.c:6458
0x724126 cp_parser_simple_type_specifier
        /home/paco/git/gcc/gcc/cp/parser.c:18129
0x70ae9d cp_parser_type_specifier
        /home/paco/git/gcc/gcc/cp/parser.c:17787
0x70be76 cp_parser_decl_specifier_seq
        /home/paco/git/gcc/gcc/cp/parser.c:14359
0x726dda cp_parser_parameter_declaration
        /home/paco/git/gcc/gcc/cp/parser.c:22765
0x7276fa cp_parser_parameter_declaration_list
        /home/paco/git/gcc/gcc/cp/parser.c:22588
0x727a65 cp_parser_parameter_declaration_clause
        /home/paco/git/gcc/gcc/cp/parser.c:22515
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] 7+ messages in thread

* [Bug c++/95159] ICE on aggregate template parameter with empty angle brackets
  2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
@ 2020-05-16  3:16 ` pacoarjonilla at yahoo dot es
  2020-05-18  5:45 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pacoarjonilla at yahoo dot es @ 2020-05-16  3:16 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Paco Arjonilla <pacoarjonilla at yahoo dot es> ---
GCC 10.1, not GCC 10.0.1

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

* [Bug c++/95159] ICE on aggregate template parameter with empty angle brackets
  2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
  2020-05-16  3:16 ` [Bug c++/95159] " pacoarjonilla at yahoo dot es
@ 2020-05-18  5:45 ` marxin at gcc dot gnu.org
  2020-07-08 19:17 ` mpolacek at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-05-18  5:45 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-05-18
     Ever confirmed|0                           |1

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed. Started with introduction of -std=c++2a.
Is it a valid or invalid code?

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

* [Bug c++/95159] ICE on aggregate template parameter with empty angle brackets
  2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
  2020-05-16  3:16 ` [Bug c++/95159] " pacoarjonilla at yahoo dot es
  2020-05-18  5:45 ` marxin at gcc dot gnu.org
@ 2020-07-08 19:17 ` mpolacek at gcc dot gnu.org
  2020-07-09 11:39 ` lutztonineubert at gmail dot com
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-07-08 19:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |lutztonineubert at gmail dot com

--- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
*** Bug 96123 has been marked as a duplicate of this bug. ***

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

* [Bug c++/95159] ICE on aggregate template parameter with empty angle brackets
  2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
                   ` (2 preceding siblings ...)
  2020-07-08 19:17 ` mpolacek at gcc dot gnu.org
@ 2020-07-09 11:39 ` lutztonineubert at gmail dot com
  2020-07-09 11:39 ` lutztonineubert at gmail dot com
  2021-04-30 21:08 ` mpolacek at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: lutztonineubert at gmail dot com @ 2020-07-09 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Toni Neubert <lutztonineubert at gmail dot com> ---
I don't think this one is valid.

But the code inside the duplicated issue could be valid:

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

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

* [Bug c++/95159] ICE on aggregate template parameter with empty angle brackets
  2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
                   ` (3 preceding siblings ...)
  2020-07-09 11:39 ` lutztonineubert at gmail dot com
@ 2020-07-09 11:39 ` lutztonineubert at gmail dot com
  2021-04-30 21:08 ` mpolacek at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: lutztonineubert at gmail dot com @ 2020-07-09 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Toni Neubert <lutztonineubert at gmail dot com> ---
I don't think this one is valid.

But the code inside the duplicated issue could be valid:

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

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

* [Bug c++/95159] ICE on aggregate template parameter with empty angle brackets
  2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
                   ` (4 preceding siblings ...)
  2020-07-09 11:39 ` lutztonineubert at gmail dot com
@ 2021-04-30 21:08 ` mpolacek at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2021-04-30 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Fixed by r12-100.

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

end of thread, other threads:[~2021-04-30 21:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-16  2:55 [Bug c++/95159] New: ICE on aggregate template parameter with empty angle brackets pacoarjonilla at yahoo dot es
2020-05-16  3:16 ` [Bug c++/95159] " pacoarjonilla at yahoo dot es
2020-05-18  5:45 ` marxin at gcc dot gnu.org
2020-07-08 19:17 ` mpolacek at gcc dot gnu.org
2020-07-09 11:39 ` lutztonineubert at gmail dot com
2020-07-09 11:39 ` lutztonineubert at gmail dot com
2021-04-30 21:08 ` 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).