https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119756
Bug ID: 119756
Summary: Error when reading source from stdin and compiling
modules: cc1plus: fatal error: stdout: No such file or
directory
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
This works:
:| ~/gcc/15/bin/g++ -x c++ - -x c++ /dev/null -c -std=c++20
It creates -.o and null.o as expected.
But if you add -fmodules -fsearch-include-path
../include/c++/15.0.1/bits/std.compat.cc then it fails:
:| ~/gcc/15/bin/g++ -x c++ - -x c++ /dev/null -c -std=c++20 -fmodules \
-fsearch-include-path ../include/c++/15.0.1/bits/std.compat.cc
cc1plus: fatal error: stdout: No such file or directory
compilation terminated.
In module imported at
/home/jwakely/gcc/15/include/c++/15.0.1/bits/std.compat.cc:30:8:
std: error: failed to read compiled module: No such file or directory
std: note: compiled module file is ‘gcm.cache/std.gcm’
std: note: imports must be built before being imported
std: fatal error: returning to the gate for a mechanical issue
compilation terminated.
It looks like something about using '-' as the input causes the module code to
use the string 'stdout' as the output.