https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127697
Bug ID: 127697
Summary: [modules] ICE on incomplete import
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: luigighiron at gmail dot com
Target Milestone: ---
The following program causes an internal compiler error on GCC 17 with
-fmodules:
import<
Error message (tested on godbolt):
> <source>:1:8: internal compiler error: unspellable token PRAGMA_EOL
> 1 | import<
> | ^
> 0xf36d25 c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level,
> cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1])
> ???:0
> 0x2d3b22a cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...)
> ???:0
> 0x2d48c03 cpp_spell_token(cpp_reader*, cpp_token const*, unsigned char*, bool)
> ???:0
> 0xf58cfa c_lex_with_flags(tree_node**, unsigned long*, unsigned char*, int)
> ???:0
> 0xddab8a c_parse_file()
> ???:0
> 0xf6ea39 c_common_parse_file()
> ???:0