The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
We recommend using Visual Studio 2017

Fatal Error C1001


The latest version of this topic can be found at Fatal Error C1001.

INTERNAL COMPILER ERROR(compiler file file, line number)

The compiler cannot generate correct code for a construct, probably due to the combination of an expression and an optimization option. Try removing one or more optimization options and recompiling the function containing the line indicated in the error message.

You can probably fix the problem by removing one or more optimization options. To determine which option is at fault, remove options one at a time and recompile until the error message goes away. The options most commonly responsible are /Og, /Oi, and /Oa. Once you determine which option is responsible, you can disable it using the optimize pragma around the function where the error occurs and continue to use the option for the rest of the module.

The Microsoft Knowledge Base has more information about C1001; see;en-us;134650.

Try rewriting the line where the error is reported, or several lines of code surrounding that line.