public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653
@ 2021-05-17  6:48 asolokha at gmx dot com
  2021-05-17  8:12 ` [Bug c++/100634] " marxin at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: asolokha at gmx dot com @ 2021-05-17  6:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

g++-12.0.0-alpha20210516 snapshot (g:4a322345cab10879162a2ddf659fb0f873ba0182)
ICEs when compiling the following testcase, extracted from
test/SemaTemplate/temp_arg_nontype_cxx20.cpp from the clang 12.0.0 test suite,
w/ -std=gnu++20:

template<_Complex int> struct ComplexInt {};
using CI = ComplexInt<1 + 3i>;

% g++-12.0.0 -std=gnu++20 -c xqj500ey.cpp
xqj500ey.cpp:2:29: internal compiler error: in convert_nontype_argument, at
cp/pt.c:7653
    2 | using CI = ComplexInt<1 + 3i>;
      |                             ^
0x6b6b34 convert_nontype_argument
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:7653
0x6b6b34 convert_template_argument
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:8546
0xacd2c3 coerce_template_parms
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:9025
0xad0069 lookup_template_class_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:9863
0xad1e31 lookup_template_class(tree_node*, tree_node*, tree_node*, tree_node*,
int, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/pt.c:10250
0xafb7fb finish_template_type(tree_node*, tree_node*, int)
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/semantics.c:3585
0xa6a1e9 cp_parser_template_id
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:17503
0xa6a3e5 cp_parser_class_name
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:24749
0xa6156a cp_parser_qualifying_entity
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:7002
0xa6156a cp_parser_nested_name_specifier_opt
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:6684
0xa7760b cp_parser_simple_type_specifier
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:18904
0xa554a5 cp_parser_type_specifier
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:18563
0xa67ae4 cp_parser_type_specifier_seq
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:23424
0xa66098 cp_parser_type_id_1
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:23224
0xa6841d cp_parser_type_id
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:23320
0xa6841d cp_parser_alias_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:20890
0xa853e5 cp_parser_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:14161
0xa86160 cp_parser_toplevel_declaration
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:14190
0xa86160 cp_parser_translation_unit
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:4942
0xa86160 c_parse_file()
       
/var/tmp/portage/sys-devel/gcc-12.0.0_alpha20210516/work/gcc-12-20210516/gcc/cp/parser.c:45393

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

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
@ 2021-05-17  8:12 ` marxin at gcc dot gnu.org
  2021-05-17  8:59 ` jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-05-17  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started with r11-2015-g50f071d999374b6d.

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

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
  2021-05-17  8:12 ` [Bug c++/100634] " marxin at gcc dot gnu.org
@ 2021-05-17  8:59 ` jakub at gcc dot gnu.org
  2021-05-17 12:52 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-05-17  8:59 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Target Milestone|---                         |11.2
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2021-05-17
                 CC|                            |jakub at gcc dot gnu.org

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

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
  2021-05-17  8:12 ` [Bug c++/100634] " marxin at gcc dot gnu.org
  2021-05-17  8:59 ` jakub at gcc dot gnu.org
@ 2021-05-17 12:52 ` rguenth at gcc dot gnu.org
  2021-05-19 21:30 ` jason at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-05-17 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2

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

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-05-17 12:52 ` rguenth at gcc dot gnu.org
@ 2021-05-19 21:30 ` jason at gcc dot gnu.org
  2021-05-20  3:11 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-05-19 21:30 UTC (permalink / raw)
  To: gcc-bugs

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

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] 8+ messages in thread

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-05-19 21:30 ` jason at gcc dot gnu.org
@ 2021-05-20  3:11 ` cvs-commit at gcc dot gnu.org
  2021-05-20  3:12 ` cvs-commit at gcc dot gnu.org
  2021-05-20  3:13 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-20  3:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 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:75ab8b4829dec8c70470e8225c9add964f71ed74

commit r12-933-g75ab8b4829dec8c70470e8225c9add964f71ed74
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 19 17:33:21 2021 -0400

    c++: _Complex template parameter [PR100634]

    We were crashing because invalid_nontype_parm_type_p allowed _Complex
    template parms, but convert_nontype_argument didn't know what to do for
    them.  Let's just disallow it, people can and should use std::complex
    instead.

            PR c++/100634

    gcc/cp/ChangeLog:

            * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/nontype-complex1.C: New test.

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

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2021-05-20  3:11 ` cvs-commit at gcc dot gnu.org
@ 2021-05-20  3:12 ` cvs-commit at gcc dot gnu.org
  2021-05-20  3:13 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-05-20  3:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jason Merrill
<jason@gcc.gnu.org>:

https://gcc.gnu.org/g:b54e50285c716fabc3980c5383c4898018a60b28

commit r11-8444-gb54e50285c716fabc3980c5383c4898018a60b28
Author: Jason Merrill <jason@redhat.com>
Date:   Wed May 19 17:33:21 2021 -0400

    c++: _Complex template parameter [PR100634]

    We were crashing because invalid_nontype_parm_type_p allowed _Complex
    template parms, but convert_nontype_argument didn't know what to do for
    them.  Let's just disallow it, people can and should use std::complex
    instead.

            PR c++/100634

    gcc/cp/ChangeLog:

            * pt.c (invalid_nontype_parm_type_p): Return true for COMPLEX_TYPE.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp2a/nontype-complex1.C: New test.

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

* [Bug c++/100634] [11/12 Regression] ICE in convert_nontype_argument,  at cp/pt.c:7653
  2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2021-05-20  3:12 ` cvs-commit at gcc dot gnu.org
@ 2021-05-20  3:13 ` jason at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: jason at gcc dot gnu.org @ 2021-05-20  3:13 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

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

--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11.2/12.

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

end of thread, other threads:[~2021-05-20  3:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-17  6:48 [Bug c++/100634] New: [11/12 Regression] ICE in convert_nontype_argument, at cp/pt.c:7653 asolokha at gmx dot com
2021-05-17  8:12 ` [Bug c++/100634] " marxin at gcc dot gnu.org
2021-05-17  8:59 ` jakub at gcc dot gnu.org
2021-05-17 12:52 ` rguenth at gcc dot gnu.org
2021-05-19 21:30 ` jason at gcc dot gnu.org
2021-05-20  3:11 ` cvs-commit at gcc dot gnu.org
2021-05-20  3:12 ` cvs-commit at gcc dot gnu.org
2021-05-20  3:13 ` jason 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).