https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107173
Bug ID: 107173 Summary: ICE: unspellable token PRAGMA_EOL on type_traits:1446:26 Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: esa.pulkkinen at iki dot fi Target Milestone: --- Created attachment 53674 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53674&action=edit output from preprocessor LC_MESSAGES=C /usr/local/bin/g++ -freport-bug -I/home/esap/c++/change/libchange-gcc/libchange -I/home/esap/c++/change/libchange -DLIBCHANGE_SHARED_BUILD -std=c++23 -finput-charset=UTF-8 -fPIC -x c++ -MQ ^ -MD -E -fdirectives-only /home/esap/c++/change/libchange/libchange/koe.cxx > bug.out In file included from /usr/local/include/c++/13.0.0/bits/stl_pair.h:60, from /usr/local/include/c++/13.0.0/tuple:38, from /home/esap/c++/change/libchange/libchange/koe.cxx:2: /usr/local/include/c++/13.0.0/type_traits:1446:26: internal compiler error: unspellable token PRAGMA_EOL 1446 | : public __is_nt_convertible_helper<_From, _To>::type | ^ 0xc731b2 c_cpp_diagnostic(cpp_reader*, cpp_diagnostic_level, cpp_warning_reason, rich_location*, char const*, __va_list_tag (*) [1]) ../.././gcc/c-family/c-common.cc:6711 0x21df1eb cpp_diagnostic_at ../.././libcpp/errors.cc:67 0x21df1eb cpp_diagnostic ../.././libcpp/errors.cc:82 0x21df316 cpp_error(cpp_reader*, cpp_diagnostic_level, char const*, ...) ../.././libcpp/errors.cc:96 0x21e9911 cpp_spell_token(cpp_reader*, cpp_token const*, unsigned char*, bool) ../.././libcpp/lex.cc:4395 0x21ea5c6 cpp_token_as_text(cpp_reader*, cpp_token const*) ../.././libcpp/lex.cc:4411 0x21e286a _cpp_parse_expr ../.././libcpp/expr.cc:1375 0x21db7b1 do_if ../.././libcpp/directives.cc:2076 0x21dd768 _cpp_handle_directive ../.././libcpp/directives.cc:572 0x21eadc2 cpp_directive_only_process(cpp_reader*, void*, void (*)(cpp_reader*, CPP_DO_task, void*, ...)) ../.././libcpp/lex.cc:5241 0xc9de61 scan_translation_unit_directives_only ../.././gcc/c-family/c-ppoutput.cc:428 0xc9de61 preprocess_file(cpp_reader*) ../.././gcc/c-family/c-ppoutput.cc:104 0xc9c110 c_common_init() ../.././gcc/c-family/c-opts.cc:1234 0xaa35ee cxx_init() ../.././gcc/cp/lex.cc:338 0x99f944 lang_dependent_init ../.././gcc/toplev.cc:1815 0x99f944 do_compile ../.././gcc/toplev.cc:2110 Please submit a full bug report, with preprocessed source. Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. input file "koe.cxx" contains only following (I've reduced it to minimal example): ==== koe.cxx === module; #include <tuple> module change:koe; === END koe.cxx === compiler command line above was mostly generated by build2-0.15.0. I think what the above means is that type_traits header is not working with modules, even if included and not imported. I don't really understand what the compiler is trying to say, I can't see anything wrong in my code nor in the <type_traits> system header. I suspect -fdirectives-only causes the problem, as removing it changes the output, and this seems to be confirmed by the stack trace produced.