Applies ToVisual Studio 2012 Update 4

Symptoms

Assume that you have applied Microsoft Visual Studio 2012 Update 4 on your computer. When you compile some C or C++ source code together with an optimization compiler option such as /Ox (Full Optimization), /Oxt, or /O2 (Maximize Speed) and you target the x64 platform, you may receive the following error message:

fatal error C1001: An internal error has occurred in the compiler.

Note The issue may occur if an array of a struct or class is used in a function call, and the first field of the first element of the array is used in a function call. Refer to the following example:S* arr = …func1(arr, …)func2(arr->firstField, …)

Resolution

Hotfix information

A supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. If the hotfix is available for download, there is a "Hotfix Download Available" section at the top of this Knowledge Base article. If this section does not appear, submit a request to Microsoft Customer Service and Support to obtain the hotfix. Note If additional issues occur or if any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. For a complete list of Microsoft Customer Service and Support telephone numbers or to create a separate service request, visit the following Microsoft website:

http://support.microsoft.com/contactus/?ws=supportNote The "Hotfix Download Available" form displays the languages for which the hotfix is available. If you do not see your language, it is because a hotfix is not available for that language.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio 2012 Update 4 installed.

Restart requirement

You may have to restart the computer after you install the hotfix if the affected files are not being used at the time of installation. We recommend that you close all Visual Studio 2010-related components before you install the hotfix.

Workaround

To work around this issue, use the /O1 (Minimize Size) optimization compiler option, or disable optimization by using /Od (Disable).

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.