https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128203
Bug ID: 128203
Summary: internal compiler error: in decl_value 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;
template <typename T> T t;
template <typename T> extern T *t<T *>;
template <typename T> T *t<T *> = nullptr;
```
Output:
```
<source>:1:8: internal compiler error: in decl_value, at cp/module.cc:8440
1 | export module M;
| ^~~~~~
0x2c6c2f8 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
???:0
0x2c60f3b internal_error(char const*, ...)
???:0
0xb9c22e fancy_abort(char const*, int, char const*)
???:0
0xd4ed56 depset::hash::find_dependencies(module_state*)
???:0
0xd4f9f1 module_state::write_begin(elf_out*, cpp_reader*, module_state_config&,
unsigned int&)
???:0
0xd51534 finish_module_processing(cpp_reader*)
???:0
0xcc6e10 c_parse_final_cleanups()
???:0
0xf8bfe8 c_common_parse_file()
???:0
/cefs/86/8648502252d366b91fe55083_gcc-trunk-20261026/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1plus
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/86/8648502252d366b91fe55083_gcc-trunk-20261026/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
-D_GNU_SOURCE <source> -quiet -dumpdir /app/ -dumpbase output.cpp -dumpbase-ext
.cpp -mtune=generic -march=x86-64 -g -std=c++20 -fdiagnostics-color=always
-fno-verbose-asm -fmodules -o /tmp/ccLexjBx.s
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
x86-64 gcc (trunk) - 462ms
```
Trunk: https://godbolt.org/z/7P5qh1oTY