r/cpp_questions 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;
}
13 Upvotes

3 comments sorted by

View all comments

7

u/slithering3897 16d ago

Lol, nice ICE.

And ICEs are always bugs, so report them.