Assume that you have installed Microsoft Visual Studio 2010 Service Pack 1 (SP1) or Visual Studio 2012 Update 4 on your computer. After that if you build a Visual C++ project, Visual Studio may crash during LINK, and you may receive the following error message:
Note The build uses Profile-Guided Optimization and the /LTCG option. If you remove the /LTCG option and the /PGD option, this issue does not occur.
link -OUT:_out/disp+work.exe -PDB:_out/disp+work.pdb -MANIFESTFILE:<yourmanifest>.mf @<yourexe>.exe.lcf -PROFILE -NXCOMPAT -STACK:0x2000000 -SWAPRUN:NET -DEBUG -OPT:REF -DEBUGTYPE:CV,FIXUP -MACHINE:amd64 -nologo _out/<yourlib>.exp ole32.lib rpcrt4.lib oleaut32.lib oledb.lib uuid.lib kernel32.lib advapi32.lib user32.lib gdi32.lib winspool.lib ws2_32.lib Iphlpapi.lib netapi32.lib comdlg32.lib shell32.lib dbghelp.lib version.lib mpr.lib secur32.lib -ltcg:pgu -pgd:<yourpdg>.pgd
PGOMGR : warning PG0188: No .PGC files matching '*pgc' were found.
_out/<yourlib>.exp : warning LNK4042: object specified more than once; extras ignored
Generating code
<sourcefile>.c : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x000007FEEE648E16:0x00000004E45E24B0]', line 183)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
Version <Link version in Visual Studio 2010 or in Visual Studio 2012>
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 000007FEEE648E16 (000007FEEE490000) "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\c2.dll"
NumberParameters = 00000002
ExceptionInformation[ 0] = 0000000000000000
ExceptionInformation[ 1] = 00000004E45E24B0
CONTEXT:
Rax = 0000000087035F78 R8 = 0000000000000000
Rbx = 0000000000000000 R9 = 0000000000000000
Rcx = 000000013FB80050 R10 = 0000000000000000
Rdx = 000000001C8E5688 R11 = 0000000000000286
Rsp = 00000000001FE1A0 R12 = 000000008FD02A28
Rbp = 0000000087035F18 E13 = 0000000000000000
Rsi = 0000000000000000 R14 = 000000003A2FB1B9
Rdi = 00000004E45E24B0 R15 = 000000011CB014A0
Rip = 000007FEEE648E16 EFlags = 0000000000010202
SegCs = 0000000000000033 SegDs = 000000000000002B
SegSs = 000000000000002B SegEs = 000000000000002B
SegFs = 0000000000000053 SegGs = 000000000000002B
Dr0 = 0000000000000000 Dr3 = 0000000000000000
Dr1 = 0000000000000000 Dr6 = 0000000000000000
Dr2 = 0000000000000000 Dr7 = 0000000000000000
PGOMGR : warning PG0188: No .PGC files matching '*pgc' were found.
_out/<yourlib>.exp : warning LNK4042: object specified more than once; extras ignored
Generating code
<sourcefile>.c : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x000007FEEE648E16:0x00000004E45E24B0]', line 183)
To work around this problem, try simplifying or changing the program near the locations listed above.
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
LINK : fatal error LNK1000: Internal error during IMAGE::BuildImage
Version <Link version in Visual Studio 2010 or in Visual Studio 2012>
ExceptionCode = C0000005
ExceptionFlags = 00000000
ExceptionAddress = 000007FEEE648E16 (000007FEEE490000) "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64\c2.dll"
NumberParameters = 00000002
ExceptionInformation[ 0] = 0000000000000000
ExceptionInformation[ 1] = 00000004E45E24B0
CONTEXT:
Rax = 0000000087035F78 R8 = 0000000000000000
Rbx = 0000000000000000 R9 = 0000000000000000
Rcx = 000000013FB80050 R10 = 0000000000000000
Rdx = 000000001C8E5688 R11 = 0000000000000286
Rsp = 00000000001FE1A0 R12 = 000000008FD02A28
Rbp = 0000000087035F18 E13 = 0000000000000000
Rsi = 0000000000000000 R14 = 000000003A2FB1B9
Rdi = 00000004E45E24B0 R15 = 000000011CB014A0
Rip = 000007FEEE648E16 EFlags = 0000000000010202
SegCs = 0000000000000033 SegDs = 000000000000002B
SegSs = 000000000000002B SegEs = 000000000000002B
SegFs = 0000000000000053 SegGs = 000000000000002B
Dr0 = 0000000000000000 Dr3 = 0000000000000000
Dr1 = 0000000000000000 Dr6 = 0000000000000000
Dr2 = 0000000000000000 Dr7 = 0000000000000000
Note The build uses Profile-Guided Optimization and the /LTCG option. If you remove the /LTCG option and the /PGD option, this issue does not occur.