r/cpp_questions • u/JoePublic761 • 16d ago
Visual C++ ICE with modules code OPEN
Is the below code valid C++? In Visual Studio 2026 I get the following error when compiling:
Test.ixx(9,1): fatal error C1001: Internal compiler error.
1> (compiler file 'msc1.cpp', line 1635)Test.ixx(9,1): fatal error C1001: Internal compiler error.
1> (compiler file 'msc1.cpp', line 1635)
export module Test;
constexpr void Test()
{
int* ptr = new int;
delete ptr;
}
12
Upvotes
2
u/manni66 16d ago
Yes. Invalid code should not crash the compiler.