https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115190
--- Comment #5 from huangqinjin at gmail dot com --- (In reply to huangqinjin from comment #3) > (In reply to Peter Damianov from comment #2) > > I could only reproduce this on MSYS2's gcc packages. On w64devkit, I > > couldn't reproduce it. Nor with a gcc 15 I built myself. > > > Oh yes, I made another test, but the error message is different. > > $ printf 'test test.gcm\r\n' > a.modmap > $ echo 'export module test;' > test.cpp > $ g++ -std=c++20 -fmodules-ts -fmodule-mapper=a.modmap -c test.cpp > test.cpp:1:8: error: unknown Compiled Module Interface: no such module > 1 | export module test; > | ^~~~~~ > test.cpp:1:8: warning: not writing module 'test' due to errors The line ending of last line is also required. Personally feel strange. $ printf 'test test.gcm' > a.modmap $ echo 'export module test;' > test.cpp $ g++ -std=c++20 -fmodules-ts -fmodule-mapper=a.modmap -c test.cpp test.cpp:1:8: error: unknown Compiled Module Interface: no such module 1 | export module test; | ^~~~~~ test.cpp:1:8: warning: not writing module 'test' due to errors