Internal Compiler Error in cxx_eval_call_expression with C++20 Modules and constexpr Expansion and inputs may not also have inputs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gcc-12 (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
I encountered an internal compiler error (ICE) while building a C++ project using C++20 modules. The error occurs during the compilation of a constructor that involves `constexpr` expansion of `std::_
Environment:
- Compiler: GCC 12 (also with GCC 13)
- OS: Ubuntu 22.04 (WSL), also with normal Ubuntu
- Build System: CMake with Ninja generator
Error Message:
[ 29%] Building CXX object src/CMakeFiles/
In module imported at /home/ubuntu/
...
included from /home/ubuntu/
from /home/ubuntu/
game_movement: note: unable to represent further imported source locations
...
/home/ubuntu/
85 | ChatChannel(
| ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
Please include the complete backtrace with any bug report.
See file://
Steps to Reproduce:
1. Compile the project using GCC 12 with C++20 modules enabled.
2. Observe the internal compiler error during the `constexpr` expansion in the constructor.
Expected Behavior:
The compiler should handle `constexpr` expansions without crashing, especially in the context of C++20 modules.
Actual Behavior:
The compiler crashes with an internal compiler error, indicating a potential issue in `cxx_eval_
Additional Context:
- The error seems to be triggered by a specific interaction between C++20 modules and `constexpr` expansions.
- I have attempted to isolate the problem to a minimal example but found that it specifically occurs in the context of our project's structure and module imports.
Please let me know if additional information or a minimal reproducible example is needed to investigate this issue further. Thank you for your assistance in addressing this compiler bug.
The project I'm testing is this: https:/
The steps to the error:
Generate a cache: cmake -B build -S . -DCMAKE_
Compile: cmake --build build
I encountered another issue as well, related to inputs, which occurs when I compile using cmakepresets. If I compile without it, I encounter the constexpr issue mentioned earlier. The other error I'm referring to is as follows:
[1/44] Building CXX object src/CMakeFiles/
FAILED: src/CMakeFiles/
/usr/bin/c++ -I/home/
inputs may not also have inputs[2/44] Building CXX object src/CMakeFiles/
The project I'm testing is this: https:/
GitHub Actions error: https:/
The steps to the error:
Generate a cache: cmake -DCMAKE_
Compile: cmake --build Linux-release
summary: |
Internal Compiler Error in cxx_eval_call_expression with C++20 Modules - and constexpr Expansion + and constexpr Expansion and inputs may not also have inputs |
description: | updated |
description: | updated |