public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
@ 2020-06-14 12:48 haoxintu at gmail dot com
2020-06-14 16:38 ` [Bug c++/95672] " haoxintu at gmail dot com
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: haoxintu at gmail dot com @ 2020-06-14 12:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Bug ID: 95672
Summary: ICE in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:584
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
$cat bug.cc
struct g_class : decltype (auto) ... { } ;
$g++ bug.cc
bug.cc:1:35: internal compiler error: in cxx_incomplete_type_diagnostic, at
cp/typeck2.c:584
1 | struct g_class : decltype (auto) ... { } ;
| ^~~
0x5cef74 cxx_incomplete_type_diagnostic(unsigned int, tree_node const*,
tree_node const*, diagnostic_t)
../../gcc/cp/typeck2.c:584
0x77b9af cxx_incomplete_type_diagnostic(tree_node const*, tree_node const*,
diagnostic_t)
../../gcc/cp/cp-tree.h:7705
0x77b9af complete_type_or_maybe_complain(tree_node*, tree_node*, int)
../../gcc/cp/typeck.c:156
0x77b9af complete_type_or_else(tree_node*, tree_node*)
../../gcc/cp/typeck.c:166
0x685881 xref_basetypes(tree_node*, tree_node*)
../../gcc/cp/decl.c:15099
0x6edfe9 cp_parser_class_head
../../gcc/cp/parser.c:24717
0x6edfe9 cp_parser_class_specifier_1
../../gcc/cp/parser.c:23874
0x6ee273 cp_parser_class_specifier
../../gcc/cp/parser.c:24248
0x6ee273 cp_parser_type_specifier
../../gcc/cp/parser.c:17762
0x6ef092 cp_parser_decl_specifier_seq
../../gcc/cp/parser.c:14410
0x6efbb1 cp_parser_simple_declaration
../../gcc/cp/parser.c:13664
0x7159c6 cp_parser_declaration
../../gcc/cp/parser.c:13484
0x7160b4 cp_parser_translation_unit
../../gcc/cp/parser.c:4761
0x7160b4 c_parse_file()
../../gcc/cp/parser.c:44034
0x7de74b c_common_parse_file()
../../gcc/c-family/c-opts.c:1190
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.
$g++ --version
g++ (GCC) 11.0.0 20200605 (experimental)
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
@ 2020-06-14 16:38 ` haoxintu at gmail dot com
2020-06-15 6:50 ` marxin at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: haoxintu at gmail dot com @ 2020-06-14 16:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #1 from Haoxin Tu <haoxintu at gmail dot com> ---
Noted that from GCC 6.1 to the trunk versions have this ICE, too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
2020-06-14 16:38 ` [Bug c++/95672] " haoxintu at gmail dot com
@ 2020-06-15 6:50 ` marxin at gcc dot gnu.org
2020-06-15 8:00 ` haoxintu at gmail dot com
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-15 6:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2020-06-15
Ever confirmed|0 |1
Status|UNCONFIRMED |WAITING
CC| |marxin at gcc dot gnu.org
--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Is it an invalid code right?
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
2020-06-14 16:38 ` [Bug c++/95672] " haoxintu at gmail dot com
2020-06-15 6:50 ` marxin at gcc dot gnu.org
@ 2020-06-15 8:00 ` haoxintu at gmail dot com
2020-06-15 11:20 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: haoxintu at gmail dot com @ 2020-06-15 8:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #3 from Haoxin Tu <haoxintu at gmail dot com> ---
(In reply to Martin Liška from comment #2)
> Is it an invalid code right?
Yes. I think it's not a valid code and other compilers do not accept it, too.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
` (2 preceding siblings ...)
2020-06-15 8:00 ` haoxintu at gmail dot com
@ 2020-06-15 11:20 ` marxin at gcc dot gnu.org
2020-06-15 18:22 ` mpolacek at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-06-15 11:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
Keywords| |ice-on-invalid-code
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
` (3 preceding siblings ...)
2020-06-15 11:20 ` marxin at gcc dot gnu.org
@ 2020-06-15 18:22 ` mpolacek at gcc dot gnu.org
2020-06-15 22:23 ` xerofoify at gmail dot com
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2020-06-15 18:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Marek Polacek <mpolacek at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mpolacek at gcc dot gnu.org
--- Comment #4 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
type_pack_expansion isn't handled in the switch in
cxx_incomplete_type_diagnostic so we ICE.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
` (4 preceding siblings ...)
2020-06-15 18:22 ` mpolacek at gcc dot gnu.org
@ 2020-06-15 22:23 ` xerofoify at gmail dot com
2020-06-24 20:08 ` cvs-commit at gcc dot gnu.org
2020-06-24 20:14 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: xerofoify at gmail dot com @ 2020-06-15 22:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Nicholas Krause <xerofoify at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |xerofoify at gmail dot com
--- Comment #5 from Nicholas Krause <xerofoify at gmail dot com> ---
Created attachment 48736
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48736&action=edit
Proposed Fix
This is a proposed fix for the bug. Not sure if we need to emit multiple
messages for different possible template expansion failures.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
` (5 preceding siblings ...)
2020-06-15 22:23 ` xerofoify at gmail dot com
@ 2020-06-24 20:08 ` cvs-commit at gcc dot gnu.org
2020-06-24 20:14 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-06-24 20:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
--- Comment #6 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:11a751ff77fba92de77b099ec5e1896d3a99d482
commit r11-1641-g11a751ff77fba92de77b099ec5e1896d3a99d482
Author: Nicholas Krause <xerofoify@gmail.com>
Date: Tue Jun 23 15:47:37 2020 -0400
c++: Handle bad pack expansion in base list. [PR96752]
This fixes PR95672 by adding the missing TYPE_PACK_EXPANSION case in
cxx_incomplete_type_diagnostic in order to avoid ICEs on diagnosing
incomplete template pack expansion cases.
Tested on powerpc64le-unknown-linux-gnu.
gcc/cp/ChangeLog:
PR c++/95672
* typeck2.c (cxx_incomplete_type_diagnostic): Add missing
TYPE_EXPANSION_PACK check for diagnosing incomplete types in
cxx_incomplete_type_diagnostic.
gcc/testsuite/ChangeLog:
PR c++/95672
* g++.dg/template/pr95672.C: New test.
Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/95672] ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
` (6 preceding siblings ...)
2020-06-24 20:08 ` cvs-commit at gcc dot gnu.org
@ 2020-06-24 20:14 ` jason at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu.org @ 2020-06-24 20:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95672
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Status|NEW |RESOLVED
Target Milestone|--- |11.0
Resolution|--- |FIXED
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for GCC 11.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-06-24 20:14 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-14 12:48 [Bug c++/95672] New: ICE in cxx_incomplete_type_diagnostic, at cp/typeck2.c:584 haoxintu at gmail dot com
2020-06-14 16:38 ` [Bug c++/95672] " haoxintu at gmail dot com
2020-06-15 6:50 ` marxin at gcc dot gnu.org
2020-06-15 8:00 ` haoxintu at gmail dot com
2020-06-15 11:20 ` marxin at gcc dot gnu.org
2020-06-15 18:22 ` mpolacek at gcc dot gnu.org
2020-06-15 22:23 ` xerofoify at gmail dot com
2020-06-24 20:08 ` cvs-commit at gcc dot gnu.org
2020-06-24 20:14 ` 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).