public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744
@ 2020-10-21  9:29 asolokha at gmx dot com
  2020-10-21 10:33 ` [Bug c++/97511] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: asolokha at gmx dot com @ 2020-10-21  9:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97511
           Summary: [11 Regression] ICE in template_parm_to_arg, at
                    cp/pt.c:4744
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---

g++-11.0.0-alpha20201018 snapshot (g:1e70b1a358b6ce3b894f284d88fbb90518d45cc0)
ICEs when compiling the following testcase, reduced from
test/SemaCXX/alias-template.cpp from the clang 10.0.1 test suite:

template <typename Z> using Z = Z;

% g++-11.0.0 -c bul6e40q.cpp
bul6e40q.cpp:1:34: internal compiler error: in template_parm_to_arg, at
cp/pt.c:4744
    1 | template <typename Z> using Z = Z;
      |                                  ^
0x67334e template_parm_to_arg(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/pt.c:4744
0xa0b849 template_parms_level_to_args(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/pt.c:4794
0xa0b927 template_parms_to_args(tree_node*)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/pt.c:4822
0xa4f31f current_template_args
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/pt.c:4839
0xa4f31f push_template_decl(tree_node*, bool)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/pt.c:5874
0x9436b1 start_decl(cp_declarator const*, cp_decl_specifier_seq*, int,
tree_node*, tree_node*, tree_node**)
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/decl.c:5398
0x9e200f cp_parser_alias_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/parser.c:20240
0x9fb82f cp_parser_template_declaration_after_parameters
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/parser.c:29233
0x9fbd00 cp_parser_explicit_template_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/parser.c:29507
0x9ffa29 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/parser.c:13524
0xa00010 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/parser.c:4793
0xa00010 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/cp/parser.c:44170
0xb2172d c_common_parse_file()
       
/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201018/work/gcc-11-20201018/gcc/c-family/c-opts.c:1188

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

* [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744
  2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
@ 2020-10-21 10:33 ` rguenth at gcc dot gnu.org
  2020-10-21 12:54 ` [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-21 10:33 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0

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

* [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb
  2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
  2020-10-21 10:33 ` [Bug c++/97511] " rguenth at gcc dot gnu.org
@ 2020-10-21 12:54 ` marxin at gcc dot gnu.org
  2020-10-21 18:20 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-10-21 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
      Known to work|                            |10.2.0
      Known to fail|                            |11.0
            Summary|[11 Regression] ICE in      |[11 Regression] ICE in
                   |template_parm_to_arg, at    |template_parm_to_arg, at
                   |cp/pt.c:4744                |cp/pt.c:4744 since
                   |                            |r11-3296-ge5d72c840a226fdb
   Last reconfirmed|                            |2020-10-21
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r11-3296-ge5d72c840a226fdb.

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

* [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb
  2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
  2020-10-21 10:33 ` [Bug c++/97511] " rguenth at gcc dot gnu.org
  2020-10-21 12:54 ` [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb marxin at gcc dot gnu.org
@ 2020-10-21 18:20 ` ppalka at gcc dot gnu.org
  2020-10-22 11:34 ` cvs-commit at gcc dot gnu.org
  2020-10-22 11:42 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-10-21 18:20 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

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

* [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb
  2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2020-10-21 18:20 ` ppalka at gcc dot gnu.org
@ 2020-10-22 11:34 ` cvs-commit at gcc dot gnu.org
  2020-10-22 11:42 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-10-22 11:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:b083a14dfe1f53446722f488885078e419238d24

commit r11-4229-gb083a14dfe1f53446722f488885078e419238d24
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu Oct 22 07:27:55 2020 -0400

    c++: Check DECL_TEMPLATE_PARM_P in duplicate_decls [PR97511]

    This makes duplicate_decls differentiate a TYPE_DECL for an alias
    template from a TYPE_DECL for one of its template parameters.  The
    recently added assert in template_parm_to_arg revealed this latent issue
    because merging of the two TYPE_DECLs cleared the DECL_TEMPLATE_PARM_P
    flag.

    With this patch, we now also correctly diagnose the name shadowing in
    the below testcase (as required by [temp.local]/6).

    gcc/cp/ChangeLog:

            PR c++/97511
            * decl.c (duplicate_decls): Return NULL_TREE if
            DECL_TEMPLATE_PARM_P differ.

    gcc/testsuite/ChangeLog:

            PR c++/97511
            * g++.dg/template/shadow3.C: New test.

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

* [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb
  2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2020-10-22 11:34 ` cvs-commit at gcc dot gnu.org
@ 2020-10-22 11:42 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2020-10-22 11:42 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Should be fixed now, thanks for the report.

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

end of thread, other threads:[~2020-10-22 11:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21  9:29 [Bug c++/97511] New: [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 asolokha at gmx dot com
2020-10-21 10:33 ` [Bug c++/97511] " rguenth at gcc dot gnu.org
2020-10-21 12:54 ` [Bug c++/97511] [11 Regression] ICE in template_parm_to_arg, at cp/pt.c:4744 since r11-3296-ge5d72c840a226fdb marxin at gcc dot gnu.org
2020-10-21 18:20 ` ppalka at gcc dot gnu.org
2020-10-22 11:34 ` cvs-commit at gcc dot gnu.org
2020-10-22 11:42 ` 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).