Home Dashboard Directory Help
Search

cl.exe: fatal error C1001 when using /O2 switch by Alexander Kornienko


Status: 

Closed
 as Fixed Help for as Fixed


2
0
Sign in
to vote
Type: Bug
ID: 616129
Opened: 10/23/2010 6:06:33 AM
Access Restriction: Public
0
Workaround(s)
view
1
User(s) can reproduce this bug

Description

I get C1001 when trying to compile C code with /O2 switch.

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

test.c
d:\...\test.c(109) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\optimize.c', line 629)
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
Details
Sign in to post a comment.
Posted by Microsoft on 1/7/2011 at 10:02 AM
Hi Alexander,

Thank you for your feedback. This limitation has been fixed, but not for SP1. It is fixed in the next version of Visual Studio. We did fix the issue, but unfortunately this did not meet the SP1 bar. We apologize that the term "fixed" is overloaded here to mean both SP1 and next version.
Posted by Alexander Kornienko on 1/5/2011 at 4:23 PM
I've installed SP1 beta and the bug is still here. If it was not supposed to be fixed, it shouldn't be marked "fixed", it should either be "postponed" or "won't fix" or something like that.

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.31118.01 for 80x86
Copyright (C) Microsoft Corporation. All rights reserved.

test.c
d:\...\test.c(109) : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\optimize.c', line 629)
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
Posted by ec-Updated on 12/10/2010 at 3:42 AM
SP1 beta has been released, you can try it.
(My bug has beed mark as non-reproduce, was fiexed at sp1 beta)

http://blogs.msdn.com/b/jasonz/archive/2010/12/07/announcing-visual-studio-2010-service-pack-1-beta.aspx

Download Service Pack 1 Beta (MSDN Subscribers only)
The link for Thursday's general availability download is here.

Posted by Alexander Kornienko on 12/2/2010 at 1:39 AM
This issue is marked as 'Fixed'. Is there a patch available?
Posted by Microsoft on 11/22/2010 at 4:31 PM
Thanks for reporting this issue. You've run into a hard code limitation in what of the optimizations done by the compiler. The limitation is designed to detect cases where the compiler has entered into an infinite loop during optimization. In your case, the compiler was not in an infinite loop and with the limit removed compiles successfully.

We'll work on getting this limit removed in the next major (non SP) release of the compiler. In the meantime you can work around this limitation by disabling the opitmizer. You can do this on a per-function basis by using optimize pragma (e.g. #pragma optimize("",off).
See more here: http://msdn.microsoft.com/en-us/library/chh3fb0k(v=VS.100).aspx
Posted by Microsoft on 10/23/2010 at 6:23 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
File Name Submitted By Submitted On File Size  
test.cpp 10/23/2010 2 KB