Assume that you compile a C source code file to a 64-bit binary file by using the Visual C/C++ compiler (Cl.exe) in Microsoft Visual Studio 2010. If you have enabled the /O1 (Minimize Space) optimization option or the /O2 (Maximize Speed) optimization option, you might receive an error message that resembles the following when you try to compile the file:
Notes
fatal error C1001: An internal error has occurred in the compiler. (compiler file 'file name and path [0x0000000054BA3E3C:0x0000000000000044]', line line number)
Notes
- This issue occurs only when you compile a C source code file to a 64-bit binary file that has the /O1 or the /O2 optimization option enabled. This issue does not occur when both optimization options are disabled or when you compile the source code file to a 32-bit binary file.
- To compile a C source code file while the /O2 (Maximize Speed) optimization option is enabled, open the Visual Studio x64 Cross Tools Command Prompt in Visual Studio 2010 tool. Or, open the Visual Studio x64 Win64 Command Prompt in Visual Studio 2010 tool. Then, execute the following command:cl 'source file path' -c -O2