public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
@ 2020-07-11 5:58 haoxintu at gmail dot com
2020-07-13 7:58 ` [Bug c++/96162] " rguenth at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: haoxintu at gmail dot com @ 2020-07-11 5:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Bug ID: 96162
Summary: [11 Regression] ICE in discriminator_for_local_entity,
at cp/mangle.c:1910
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Keywords: error-recovery, ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: haoxintu at gmail dot com
Target Milestone: ---
Hi, all.
This code, test.cc, is an invalid code, makes GCC-trunk ICE. Interestingly,
this code does not trigger other released GCC-10 or GCC-9 ICE (confused by
earlier errors, bailing out). I guess this is a special regression
error-recovery case that is different from others.
$cat test.cc
#include <iostream>
void foo() {
for (thread_local int * a ){}
}
$g++ test.cc
test.cc: In function ‘void foo()’:
test.cc:3:30: error: expected ‘;’ before ‘)’ token
3 | for (thread_local int * a ){}
| ^~
| ;
test.cc:3:31: error: expected primary-expression before ‘)’ token
3 | for (thread_local int * a ){}
| ^
test.cc:3:30: error: expected ‘;’ before ‘)’ token
3 | for (thread_local int * a ){}
| ^~
| ;
test.cc: At global scope:
test.cc:3:29: internal compiler error: in discriminator_for_local_entity, at
cp/mangle.c:1910
3 | for (thread_local int * a ){}
| ^
0x69e943 discriminator_for_local_entity
../../gcc/cp/mangle.c:1910
0x9cdee8 write_local_name
../../gcc/cp/mangle.c:2019
0x9cdee8 write_name
../../gcc/cp/mangle.c:973
0x9d05a7 write_encoding
../../gcc/cp/mangle.c:825
0x9d5981 mangle_decl_string
../../gcc/cp/mangle.c:3858
0x9d5ba6 get_mangled_id
../../gcc/cp/mangle.c:3879
0x9d5ba6 mangle_decl(tree_node*)
../../gcc/cp/mangle.c:3917
0x12fca7d decl_assembler_name(tree_node*)
../../gcc/tree.c:708
0xbf17d9 symbol_table::insert_to_assembler_name_hash(symtab_node*, bool)
../../gcc/symtab.c:174
0xbf193c symbol_table::symtab_initialize_asm_name_hash()
../../gcc/symtab.c:266
0xbf2334 symbol_table::symtab_initialize_asm_name_hash()
../../gcc/symtab.c:1033
0xbf2334 symtab_node::get_for_asmname(tree_node const*)
../../gcc/symtab.c:1021
0xc02e60 handle_alias_pairs
../../gcc/cgraphunit.c:1512
0xc08ccc symbol_table::finalize_compilation_unit()
../../gcc/cgraphunit.c:2962
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++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/home/haoxin/compilers/gcc/build/libexec/gcc/x86_64-pc-linux-gnu/11.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../configure CC=gcc-10 CXX=g++-10
--prefix=/home/haoxin/compilers/gcc/build/ --enable-languages=c,c++
--disable-multilib
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 11.0.0 20200708 (experimental) (GCC)
Thanks,
Haoxin
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
@ 2020-07-13 7:58 ` rguenth at gcc dot gnu.org
2020-07-14 14:19 ` haoxintu at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-07-13 7:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |11.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
2020-07-13 7:58 ` [Bug c++/96162] " rguenth at gcc dot gnu.org
@ 2020-07-14 14:19 ` haoxintu at gmail dot com
2020-10-16 11:58 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: haoxintu at gmail dot com @ 2020-07-14 14:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
--- Comment #1 from Haoxin Tu <haoxintu at gmail dot com> ---
Add a more case.
$cat p.cc
#include <iostream>
int a() {
for (static int & b) {}
}
$g++ p.cc
test.cc: In function ‘int a()’:
test.cc:3:24: error: expected ‘;’ before ‘)’ token
3 | for (static int & b) {}
| ^
| ;
test.cc:3:24: error: expected primary-expression before ‘)’ token
test.cc:3:24: error: expected ‘;’ before ‘)’ token
3 | for (static int & b) {}
| ^
| ;
during GIMPLE pass: *build_cgraph_edges
test.cc:3:23: internal compiler error: in discriminator_for_local_entity, at
cp/mangle.c:1910
3 | for (static int & b) {}
| ^
0x63316d discriminator_for_local_entity
../../gcc/cp/mangle.c:1910
This time GCC emits "during GIMPLE pass: *build_cgraph_edges" first and then
triggers the ICE.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
2020-07-13 7:58 ` [Bug c++/96162] " rguenth at gcc dot gnu.org
2020-07-14 14:19 ` haoxintu at gmail dot com
@ 2020-10-16 11:58 ` rguenth at gcc dot gnu.org
2021-04-27 11:39 ` [Bug c++/96162] [11/12 " jakub at gcc dot gnu.org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-16 11:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11/12 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (2 preceding siblings ...)
2020-10-16 11:58 ` rguenth at gcc dot gnu.org
@ 2021-04-27 11:39 ` jakub at gcc dot gnu.org
2021-07-28 7:04 ` rguenth at gcc dot gnu.org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-27 11:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.0 |11.2
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 11.1 has been released, retargeting bugs to GCC 11.2.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11/12 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (3 preceding siblings ...)
2021-04-27 11:39 ` [Bug c++/96162] [11/12 " jakub at gcc dot gnu.org
@ 2021-07-28 7:04 ` rguenth at gcc dot gnu.org
2021-09-10 23:44 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28 7:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|11.2 |11.3
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11/12 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (4 preceding siblings ...)
2021-07-28 7:04 ` rguenth at gcc dot gnu.org
@ 2021-09-10 23:44 ` pinskia at gcc dot gnu.org
2021-09-10 23:50 ` [Bug c++/96162] [9/10/11/12 " pinskia at gcc dot gnu.org
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10 23:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2021-09-10
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [9/10/11/12 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (5 preceding siblings ...)
2021-09-10 23:44 ` pinskia at gcc dot gnu.org
@ 2021-09-10 23:50 ` pinskia at gcc dot gnu.org
2021-09-10 23:50 ` pinskia at gcc dot gnu.org
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10 23:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-checking
Target Milestone|11.3 |9.5
Summary|[11/12 Regression] ICE in |[9/10/11/12 Regression] ICE
|discriminator_for_local_ent |in
|ity, at cp/mangle.c:1910 |discriminator_for_local_ent
| |ity, at cp/mangle.c:1910
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This only ICEs with checking enabled as:
gcc_checking_assert (DECL_ARTIFICIAL (entity));
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [9/10/11/12 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (6 preceding siblings ...)
2021-09-10 23:50 ` [Bug c++/96162] [9/10/11/12 " pinskia at gcc dot gnu.org
@ 2021-09-10 23:50 ` pinskia at gcc dot gnu.org
2022-05-27 9:43 ` [Bug c++/96162] [10/11/12/13 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-09-10 23:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |trivial
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [10/11/12/13 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (7 preceding siblings ...)
2021-09-10 23:50 ` pinskia at gcc dot gnu.org
@ 2022-05-27 9:43 ` rguenth at gcc dot gnu.org
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug c++/96162] [11/12/13/14 " rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27 9:43 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.5 |10.4
--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9 branch is being closed
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [10/11/12/13 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (8 preceding siblings ...)
2022-05-27 9:43 ` [Bug c++/96162] [10/11/12/13 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug c++/96162] [11/12/13/14 " rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.4 |10.5
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/96162] [11/12/13/14 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
` (9 preceding siblings ...)
2022-06-28 10:41 ` jakub at gcc dot gnu.org
@ 2023-07-07 10:37 ` rguenth at gcc dot gnu.org
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 10:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96162
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|10.5 |11.5
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 10 branch is being closed.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2023-07-07 10:37 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-11 5:58 [Bug c++/96162] New: [11 Regression] ICE in discriminator_for_local_entity, at cp/mangle.c:1910 haoxintu at gmail dot com
2020-07-13 7:58 ` [Bug c++/96162] " rguenth at gcc dot gnu.org
2020-07-14 14:19 ` haoxintu at gmail dot com
2020-10-16 11:58 ` rguenth at gcc dot gnu.org
2021-04-27 11:39 ` [Bug c++/96162] [11/12 " jakub at gcc dot gnu.org
2021-07-28 7:04 ` rguenth at gcc dot gnu.org
2021-09-10 23:44 ` pinskia at gcc dot gnu.org
2021-09-10 23:50 ` [Bug c++/96162] [9/10/11/12 " pinskia at gcc dot gnu.org
2021-09-10 23:50 ` pinskia at gcc dot gnu.org
2022-05-27 9:43 ` [Bug c++/96162] [10/11/12/13 " rguenth at gcc dot gnu.org
2022-06-28 10:41 ` jakub at gcc dot gnu.org
2023-07-07 10:37 ` [Bug c++/96162] [11/12/13/14 " rguenth 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).