public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
@ 2020-11-24 18:32 gscfq@t-online.de
2020-11-25 8:11 ` [Bug c++/97974] " marxin at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: gscfq@t-online.de @ 2020-11-24 18:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Bug ID: 97974
Summary: [9/10/11 Regression] ICE tree check: expected
overload, have function_decl in
get_class_binding_direct, at cp/name-lookup.c:1332
Product: gcc
Version: 11.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gscfq@t-online.de
Target Milestone: ---
Started with r8 before 20180525 :
$ cat z1.cc
struct {
struct {
operator int ();
int a;
};
operator int;
};
$ g++-11-20201122 -c z1.cc
z1.cc:6:12: internal compiler error: tree check: expected overload, have
function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
6 | operator int
| ^~~
0x6520ba tree_check_failed(tree_node const*, char const*, int, char const*,
...)
../../gcc/tree.c:9810
0x7fad5a tree_check(tree_node*, char const*, int, char const*, tree_code)
../../gcc/tree.h:3317
0x7fad5a get_class_binding_direct(tree_node*, tree_node*, bool)
../../gcc/cp/name-lookup.c:1332
0x8ea66b lookup_field_r
../../gcc/cp/search.c:978
0x8e904e dfs_walk_all(tree_node*, tree_node* (*)(tree_node*, void*), tree_node*
(*)(tree_node*, void*), void*)
../../gcc/cp/search.c:1408
0x8e91fc lookup_member(tree_node*, tree_node*, int, bool, int,
access_failure_info*)
../../gcc/cp/search.c:1121
0x8e95a0 lookup_fnfields(tree_node*, tree_node*, int, int)
../../gcc/cp/search.c:1327
0x80aada lookup_name_1
../../gcc/cp/name-lookup.c:6587
0x80aada lookup_name(tree_node*, LOOK_where, LOOK_want)
../../gcc/cp/name-lookup.c:6665
0x811255 lookup_name(tree_node*, LOOK_want)
../../gcc/cp/name-lookup.h:294
0x811255 cp_parser_lookup_name
../../gcc/cp/parser.c:28864
0x818615 cp_parser_diagnose_invalid_type_name
../../gcc/cp/parser.c:3365
0x84a063 cp_parser_parse_and_diagnose_invalid_type_name
../../gcc/cp/parser.c:3619
0x860367 cp_parser_member_declaration
../../gcc/cp/parser.c:25456
0x82f722 cp_parser_member_specification_opt
../../gcc/cp/parser.c:25306
0x82f722 cp_parser_class_specifier_1
../../gcc/cp/parser.c:24395
0x832159 cp_parser_class_specifier
../../gcc/cp/parser.c:24706
0x832159 cp_parser_type_specifier
../../gcc/cp/parser.c:17962
0x832d86 cp_parser_decl_specifier_seq
../../gcc/cp/parser.c:14584
0x8339f1 cp_parser_simple_declaration
../../gcc/cp/parser.c:13841
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
@ 2020-11-25 8:11 ` marxin at gcc dot gnu.org
2020-11-25 8:20 ` rguenth at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-25 8:11 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
Last reconfirmed| |2020-11-25
CC| |marxin at gcc dot gnu.org,
| |nathan at gcc dot gnu.org
--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Started to ICE with r8-7029-g35129fd3a745403b.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
2020-11-25 8:11 ` [Bug c++/97974] " marxin at gcc dot gnu.org
@ 2020-11-25 8:20 ` rguenth at gcc dot gnu.org
2021-04-10 15:12 ` jason at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-25 8:20 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
Target Milestone|--- |9.4
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
2020-11-25 8:11 ` [Bug c++/97974] " marxin at gcc dot gnu.org
2020-11-25 8:20 ` rguenth at gcc dot gnu.org
@ 2021-04-10 15:12 ` jason at gcc dot gnu.org
2021-04-11 3:52 ` cvs-commit at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-10 15:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu.org
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |jason at gcc dot gnu.org
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (2 preceding siblings ...)
2021-04-10 15:12 ` jason at gcc dot gnu.org
@ 2021-04-11 3:52 ` cvs-commit at gcc dot gnu.org
2021-04-12 19:49 ` [Bug c++/97974] [9/10 " jason at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-11 3:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
--- 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:936d500dfc17f58f2507ecd0f7f26e4f197052ee
commit r11-8120-g936d500dfc17f58f2507ecd0f7f26e4f197052ee
Author: Jason Merrill <jason@redhat.com>
Date: Sat Apr 10 14:00:15 2021 -0400
c++: ICE with anonymous union [PR97974]
Here lookup got confused by finding a conversion operator from
lookup_anon_field. Let's avoid this by pruning functions from
CLASSTYPE_MEMBER_VEC as well as TYPE_FIELDS.
gcc/cp/ChangeLog:
PR c++/97974
* decl.c (fixup_anonymous_aggr): Prune all functions from
CLASSTYPE_MEMBER_VEC.
gcc/testsuite/ChangeLog:
PR c++/97974
* g++.dg/lookup/pr84962.C: Adjust diagnostic.
* g++.dg/other/anon-union5.C: New test.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (3 preceding siblings ...)
2021-04-11 3:52 ` cvs-commit at gcc dot gnu.org
@ 2021-04-12 19:49 ` jason at gcc dot gnu.org
2021-04-29 18:42 ` cvs-commit at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jason at gcc dot gnu.org @ 2021-04-12 19:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |11.0
Summary|[9/10/11 Regression] ICE |[9/10 Regression] ICE tree
|tree check: expected |check: expected overload,
|overload, have |have function_decl in
|function_decl in |get_class_binding_direct,
|get_class_binding_direct, |at cp/name-lookup.c:1332
|at cp/name-lookup.c:1332 |
--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> ---
Fixed for 11 so far.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (4 preceding siblings ...)
2021-04-12 19:49 ` [Bug c++/97974] [9/10 " jason at gcc dot gnu.org
@ 2021-04-29 18:42 ` cvs-commit at gcc dot gnu.org
2021-06-01 8:19 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-04-29 18:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
--- Comment #4 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:58a92b789a77cdade1f41800efebf6e0686f9982
commit r12-298-g58a92b789a77cdade1f41800efebf6e0686f9982
Author: Jason Merrill <jason@redhat.com>
Date: Sat Apr 10 14:00:15 2021 -0400
c++: ICE with anonymous union [PR97974]
While working on the GCC 11 patch, it occurred to me that we could move
the errors about invalid members from finish_struct_anon_r to here, so we
properly get a diagnostic in g++.law/union4.C.
gcc/cp/ChangeLog:
PR c++/97974
* class.c (finish_struct_anon_r): Drop complain parm.
Remove non-field diagnostic.
(finish_struct_anon): Adjust.
* decl.c (fixup_anonymous_aggr): Move non-field diagnostic here.
gcc/testsuite/ChangeLog:
PR c++/97974
* g++.old-deja/g++.law/union4.C: Add expected diagnostic.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [9/10 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (5 preceding siblings ...)
2021-04-29 18:42 ` cvs-commit at gcc dot gnu.org
@ 2021-06-01 8:19 ` rguenth at gcc dot gnu.org
2022-05-27 9:43 ` [Bug c++/97974] [10 " rguenth at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01 8:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|9.4 |9.5
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug c++/97974] [10 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (6 preceding siblings ...)
2021-06-01 8:19 ` rguenth at gcc dot gnu.org
@ 2022-05-27 9:43 ` rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07 9:13 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ 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=97974
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] 11+ messages in thread
* [Bug c++/97974] [10 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (7 preceding siblings ...)
2022-05-27 9:43 ` [Bug c++/97974] [10 " rguenth at gcc dot gnu.org
@ 2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07 9:13 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-06-28 10:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
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] 11+ messages in thread
* [Bug c++/97974] [10 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
` (8 preceding siblings ...)
2022-06-28 10:42 ` jakub at gcc dot gnu.org
@ 2023-07-07 9:13 ` rguenth at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-07-07 9:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97974
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Target Milestone|10.5 |11.0
Known to fail| |10.5.0
Resolution|--- |FIXED
--- Comment #8 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed in GCC 11.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2023-07-07 9:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-24 18:32 [Bug c++/97974] New: [9/10/11 Regression] ICE tree check: expected overload, have function_decl in get_class_binding_direct, at cp/name-lookup.c:1332 gscfq@t-online.de
2020-11-25 8:11 ` [Bug c++/97974] " marxin at gcc dot gnu.org
2020-11-25 8:20 ` rguenth at gcc dot gnu.org
2021-04-10 15:12 ` jason at gcc dot gnu.org
2021-04-11 3:52 ` cvs-commit at gcc dot gnu.org
2021-04-12 19:49 ` [Bug c++/97974] [9/10 " jason at gcc dot gnu.org
2021-04-29 18:42 ` cvs-commit at gcc dot gnu.org
2021-06-01 8:19 ` rguenth at gcc dot gnu.org
2022-05-27 9:43 ` [Bug c++/97974] [10 " rguenth at gcc dot gnu.org
2022-06-28 10:42 ` jakub at gcc dot gnu.org
2023-07-07 9:13 ` 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).