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

            Bug ID: 128530
           Summary: internal compiler error: tree check: expected
                    function_decl, have type_decl in add_binding_entity,
                    at cp/module.cc
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 0599jiangyc at gmail dot com
  Target Milestone: ---

The following code:
```cpp
export module M;
int F;
class A { friend class F; };
```

Resulted in this output:
```
<source>:1:8: internal compiler error: tree check: expected function_decl, have
type_decl in add_binding_entity, at cp/module.cc:15029
```

Trunk reproducer (`-std=c++20 -fmodules-ts`): https://godbolt.org/z/K7zeMYnTx

Reply via email to