Internal compiler error (x86, O2) - by Ivan Shcheklein

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 623280 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 11/19/2010 8:50:04 AM
Access Restriction Public


test.cpp : fatal error C1001: An internal error has occurred in the compiler.
(compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x6F01A633:0x00000005]', line 183)
 To work around this problem, try simplifying or changing the program near the locations listed above.


#include <string>
#include <stdio.h>

#define USER_EXCEPTION2(internal_code, details) \
    (fprintf(stdout, "asdsdasdasdasdasdasdasdasdasd"), \
	 SednaUserException(details, internal_code))

class SednaException 
    std::string err_msg;
	SednaException(const char* _err_msg_) : err_msg(_err_msg_) {}

class SednaUserException : public SednaException
	int internal_code;
    SednaUserException(const char* _err_msg_,
                       int _internal_code_) : SednaException(_err_msg_), 
                                              internal_code(_internal_code_) {}

struct tuple_cell

struct fnumber {
	int		x;
	int		y;
	fnumber(int the_x, int the_y) {
		if (the_x > the_y || the_x<0 || the_y<=0) 
			throw USER_EXCEPTION2(103, "in fnumber");
		x = the_x;
		y = the_y;

tuple_cell EMPTY_TUPLE_CELL;
fnumber PROPORTION(0,1);
Sign in to post a comment.
Posted by Microsoft on 12/7/2010 at 3:41 PM
Thank you Ivan for letting me know your status. This issue was recently fixed and will be a part of a future release of Visual Studios.
Posted by Ivan Shcheklein on 12/3/2010 at 3:28 PM
Lawrence, we don't need workarounds now. In the project from which this simplified code snippet was taken we already significantly refactored our headers to stay with /O2. Anyway, thanks for suggestion. Hope this case will help you to make CL better ).
Posted by Microsoft on 12/3/2010 at 3:02 PM
Hello Ivan,

I am the developer looking at your bug. I am still investigating the issue but I can provide a workaround so that your build can proceed. Based on the provided repro the workaround is to disable optimizations on the PROPORTION definition:

In test.cpp replace fnumber PRPORTION(0,1); with

#pragma optimize ("", off) // turn off optimizations
fnumber PROPORTION(0,1);
#pragma optimize ("", on) // turn optimizations back on

I will update this bug on my progress. Let me know if the workaround works out for you and if there are anything else you want to add.

Lawrence Joel
Posted by Microsoft on 11/22/2010 at 9:15 PM
Thanks for your feedback.
We are routing this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Ivan Shcheklein on 11/22/2010 at 11:49 AM
Thanks for response. Attached solution reproduces this bug on two different machines.
Posted by Microsoft on 11/21/2010 at 11:42 PM
Thank you for reporting this issue. Unfortunately, we are unable to reproduce the issue with the steps you provided.

Could you please provide us with a sample project zip?

It would be greatly appreciated if you could provide us this information as quickly as possible.

Thank you,
Posted by Microsoft on 11/19/2010 at 9:21 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(