public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
@ 2021-02-24  8:51 alexander.lelyakin at googlemail dot com
  2021-02-28 21:00 ` [Bug c++/99248] [modules] ICE " alexander.lelyakin at googlemail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-02-24  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99248
           Summary: internal compiler error: tree check: expected
                    binding_vector, have overload in
                    lookup_elaborated_type_1, at cp/name-lookup.c:8013
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: alexander.lelyakin at googlemail dot com
  Target Milestone: ---

g++ -std=c++20 -fmodules-ts -x c++-system-header chrono
g++ -std=c++20 -fmodules-ts -x c++-system-header regex
g++ -std=c++20 -fmodules-ts -x c++-system-header complex
g++ -std=c++20 -fmodules-ts -x c++-system-header execution
g++ -std=c++20 -fmodules-ts -x c++-system-header ctgmath
g++ -std=c++20 -fmodules-ts -x c++-system-header codecvt
g++ -std=c++20 -fmodules-ts -x c++-system-header source_location
g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header set
g++ -std=c++20 -fmodules-ts -x c++-system-header typeinfo
g++ -std=c++20 -fmodules-ts -x c++-system-header cinttypes
g++ -std=c++20 -fmodules-ts -x c++-system-header cwctype
g++ -std=c++20 -fmodules-ts -x c++-system-header compare
g++ -std=c++20 -fmodules-ts -x c++-system-header cassert
g++ -std=c++20 -fmodules-ts -x c++-system-header ios
----
In file included from /usr/local/include/c++/11.0.0/bits/locale_facets.h:2682,
                 from /usr/local/include/c++/11.0.0/bits/basic_ios.h:37,
                 from /usr/local/include/c++/11.0.0/ios:44:
/usr/local/include/c++/11.0.0/bits/locale_facets.tcc:42:12: internal compiler
error: tree check: expected binding_vector, have overload in
lookup_elaborated_type_1, at cp/name-lookup.c:8013
   42 |     struct __use_cache
      |            ^~~~~~~~~~~
0x875404 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9814
0x6eb51c tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/gcc/tree.h:3349
0x6eb51c lookup_elaborated_type_1
        ../../gcc/gcc/cp/name-lookup.c:8013
0x6eb51c lookup_elaborated_type(tree_node*, TAG_how)
        ../../gcc/gcc/cp/name-lookup.c:8104
0x9c3355 lookup_and_check_tag
        ../../gcc/gcc/cp/decl.c:15076
0x9c3711 xref_tag_1
        ../../gcc/gcc/cp/decl.c:15190
0x9c3c60 xref_tag(tag_types, tree_node*, TAG_how, bool)
        ../../gcc/gcc/cp/decl.c:15323
0xaa4812 cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:25529
0xaa4812 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:24746
0xaa5183 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:25125
0xaa5183 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18372
0xaa6119 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:14994
0xad0a86 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:30343
0xad0e06 cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:30006
0xad15b0 cp_parser_explicit_template_declaration
        ../../gcc/gcc/cp/parser.c:30272
0xad3d09 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:14000
0xad32a9 cp_parser_toplevel_declaration
        ../../gcc/gcc/cp/parser.c:14098
0xad32a9 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:13886
0xad3742 cp_parser_namespace_body
        ../../gcc/gcc/cp/parser.c:20386
0xad3742 cp_parser_namespace_definition
        ../../gcc/gcc/cp/parser.c:20364
----
g++ (GCC) 11.0.0 20210223 (experimental)

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

* [Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
  2021-02-24  8:51 [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 alexander.lelyakin at googlemail dot com
@ 2021-02-28 21:00 ` alexander.lelyakin at googlemail dot com
  2021-03-11  8:12 ` alexander.lelyakin at googlemail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-02-28 21:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
There is a shorter sequence:

g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header complex
----
In file included from /usr/local/include/c++/11.0.1/bits/locale_facets.h:2682,
                 from /usr/local/include/c++/11.0.1/bits/basic_ios.h:37,
                 from /usr/local/include/c++/11.0.1/ios:44,
                 from /usr/local/include/c++/11.0.1/istream:38,
                 from /usr/local/include/c++/11.0.1/sstream:38,
                 from /usr/local/include/c++/11.0.1/complex:45:
/usr/local/include/c++/11.0.1/bits/locale_facets.tcc:42:12: internal compiler
error: tree check: expected binding_vector, have overload in
lookup_elaborated_type_1, at cp/name-lookup.c:8013
   42 |     struct __use_cache
      |            ^~~~~~~~~~~
0x875454 tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9814
0x6eb4e2 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/gcc/tree.h:3349
0x6eb4e2 lookup_elaborated_type_1
        ../../gcc/gcc/cp/name-lookup.c:8013
0x6eb4e2 lookup_elaborated_type(tree_node*, TAG_how)
        ../../gcc/gcc/cp/name-lookup.c:8104
0x9c37f5 lookup_and_check_tag
        ../../gcc/gcc/cp/decl.c:15073
0x9c3bb1 xref_tag_1
        ../../gcc/gcc/cp/decl.c:15187
0x9c4100 xref_tag(tag_types, tree_node*, TAG_how, bool)
        ../../gcc/gcc/cp/decl.c:15320
0xaa4ff2 cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:25576
0xaa4ff2 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:24793
0xaa5963 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:25172
0xaa5963 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18419
0xaa68f9 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:15041
0xad1436 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:30390
0xad17b6 cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:30053
0xad1f60 cp_parser_explicit_template_declaration
        ../../gcc/gcc/cp/parser.c:30319
0xad46b9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:14047
0xad3c59 cp_parser_toplevel_declaration
        ../../gcc/gcc/cp/parser.c:14145
0xad3c59 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:13933
0xad40f2 cp_parser_namespace_body
        ../../gcc/gcc/cp/parser.c:20433
0xad40f2 cp_parser_namespace_definition
        ../../gcc/gcc/cp/parser.c:20411
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++ (GCC) 11.0.1 20210228 (experimental)

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

* [Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
  2021-02-24  8:51 [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 alexander.lelyakin at googlemail dot com
  2021-02-28 21:00 ` [Bug c++/99248] [modules] ICE " alexander.lelyakin at googlemail dot com
@ 2021-03-11  8:12 ` alexander.lelyakin at googlemail dot com
  2021-03-11 19:52 ` nathan at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: alexander.lelyakin at googlemail dot com @ 2021-03-11  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Alexander Lelyakin <alexander.lelyakin at googlemail dot com> ---
There is much shorter sequence in last version 20210310:

g++ -std=c++20 -fmodules-ts -x c++-system-header streambuf
g++ -std=c++20 -fmodules-ts -x c++-system-header istream
----
In file included from /usr/local/include/c++/11.0.1/bits/locale_facets.h:2682,
                 from /usr/local/include/c++/11.0.1/bits/basic_ios.h:37,
                 from /usr/local/include/c++/11.0.1/ios:44,
                 from /usr/local/include/c++/11.0.1/istream:38:
/usr/local/include/c++/11.0.1/bits/locale_facets.tcc:42:12: internal compiler
error: tree check: expected binding_vector, have overload in
lookup_elaborated_type_1, at cp/name-lookup.c:7943
   42 |     struct __use_cache
      |            ^~~~~~~~~~~
0x875bfa tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../gcc/gcc/tree.c:9816
0x6eb804 tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../gcc/gcc/tree.h:3353
0x6eb804 lookup_elaborated_type_1
        ../../gcc/gcc/cp/name-lookup.c:7943
0x6eb804 lookup_elaborated_type(tree_node*, TAG_how)
        ../../gcc/gcc/cp/name-lookup.c:8034
0x9c5385 lookup_and_check_tag
        ../../gcc/gcc/cp/decl.c:15080
0x9c5741 xref_tag_1
        ../../gcc/gcc/cp/decl.c:15194
0x9c5c90 xref_tag(tag_types, tree_node*, TAG_how, bool)
        ../../gcc/gcc/cp/decl.c:15327
0xaa75c2 cp_parser_class_head
        ../../gcc/gcc/cp/parser.c:25586
0xaa75c2 cp_parser_class_specifier_1
        ../../gcc/gcc/cp/parser.c:24803
0xaa7f23 cp_parser_class_specifier
        ../../gcc/gcc/cp/parser.c:25182
0xaa7f23 cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:18429
0xaa8eb9 cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:15051
0xad3a76 cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:30412
0xad3df6 cp_parser_template_declaration_after_parameters
        ../../gcc/gcc/cp/parser.c:30075
0xad45a0 cp_parser_explicit_template_declaration
        ../../gcc/gcc/cp/parser.c:30341
0xad6cc9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:14057
0xad6299 cp_parser_toplevel_declaration
        ../../gcc/gcc/cp/parser.c:14155
0xad6299 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:13943
0xad6732 cp_parser_namespace_body
        ../../gcc/gcc/cp/parser.c:20443
0xad6732 cp_parser_namespace_definition
        ../../gcc/gcc/cp/parser.c:20421
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++ (GCC) 11.0.1 20210310 (experimental)
Copyright (C) 2021 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] 6+ messages in thread

* [Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
  2021-02-24  8:51 [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 alexander.lelyakin at googlemail dot com
  2021-02-28 21:00 ` [Bug c++/99248] [modules] ICE " alexander.lelyakin at googlemail dot com
  2021-03-11  8:12 ` alexander.lelyakin at googlemail dot com
@ 2021-03-11 19:52 ` nathan at gcc dot gnu.org
  2021-03-11 21:13 ` cvs-commit at gcc dot gnu.org
  2021-03-11 21:13 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-11 19:52 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-03-11

--- Comment #3 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
thanks, that saved some time.
// pr99248.h
class locale
{
  template<typename _Cache>
  friend struct __use_cache;
};
// pr99248.a.H
#include "pr99248.h"
// pr99248_b.H
#include "pr99248.h"
import "pr99248_a.H";

template<typename _Facet>
struct __use_cache;

zathras:52>./cc1plus -quiet -fmodule-header pr99248_a.H && ./cc1plus -quiet
-fmodule-header pr99248_b.H
pr99248_b.H:7:8: internal compiler error: tree check: expected binding_vector,
have overload in lookup_elaborated_type_1, at cp/name-lookup.c:7943
    7 | struct __use_cache;
      |        ^~~~~~~~~~~
0x1acec3b tree_check_failed(tree_node const*, char const*, int, char const*,
...)
        ../../../src/gcc/tree.c:9816
0xad785c tree_check(tree_node*, char const*, int, char const*, tree_code)
        ../../../src/gcc/tree.h:3353
0xd1f7d3 lookup_elaborated_type_1
        ../../../src/gcc/cp/name-lookup.c:7943

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

* [Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
  2021-02-24  8:51 [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 alexander.lelyakin at googlemail dot com
                   ` (2 preceding siblings ...)
  2021-03-11 19:52 ` nathan at gcc dot gnu.org
@ 2021-03-11 21:13 ` cvs-commit at gcc dot gnu.org
  2021-03-11 21:13 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-03-11 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Nathan Sidwell <nathan@gcc.gnu.org>:

https://gcc.gnu.org/g:5f27a9f90d4eadadf937f1a5d0bfccf39261f330

commit r11-7632-g5f27a9f90d4eadadf937f1a5d0bfccf39261f330
Author: Nathan Sidwell <nathan@acm.org>
Date:   Thu Mar 11 13:06:36 2021 -0800

    c++: Fix unhiding friend with imports [PR 99248]

    This was a simple thinko about which object held the reference to the
    binding vector.  I also noticed stale code in the tree dumper, as I
    recently removed the flags from a lazy number.

            PR c++/99248
            gcc/cp/
            * name-lookup.c (lookup_elaborated_type_1): Access slot not bind
            when there's a binding vector.
            * ptree.c (cxx_print_xnode): Lazy flags are no longer a thing.
            gcc/testsuite/
            * g++.dg/modules/pr99248.h: New.
            * g++.dg/modules/pr99248_a.H: New.
            * g++.dg/modules/pr99248_b.H: New.

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

* [Bug c++/99248] [modules] ICE expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013
  2021-02-24  8:51 [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 alexander.lelyakin at googlemail dot com
                   ` (3 preceding siblings ...)
  2021-03-11 21:13 ` cvs-commit at gcc dot gnu.org
@ 2021-03-11 21:13 ` nathan at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: nathan at gcc dot gnu.org @ 2021-03-11 21:13 UTC (permalink / raw)
  To: gcc-bugs

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

Nathan Sidwell <nathan at gcc dot gnu.org> changed:

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

--- Comment #5 from Nathan Sidwell <nathan at gcc dot gnu.org> ---
5f27a9f90d4 2021-03-11 | c++: Fix unhiding friend with imports [PR 99248]

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

end of thread, other threads:[~2021-03-11 21:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-24  8:51 [Bug c++/99248] New: internal compiler error: tree check: expected binding_vector, have overload in lookup_elaborated_type_1, at cp/name-lookup.c:8013 alexander.lelyakin at googlemail dot com
2021-02-28 21:00 ` [Bug c++/99248] [modules] ICE " alexander.lelyakin at googlemail dot com
2021-03-11  8:12 ` alexander.lelyakin at googlemail dot com
2021-03-11 19:52 ` nathan at gcc dot gnu.org
2021-03-11 21:13 ` cvs-commit at gcc dot gnu.org
2021-03-11 21:13 ` nathan 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).