Compiler Bug when generating data. - by Tom van Dijck

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 582063 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 7/31/2010 3:00:56 PM
Access Restriction Public


It appears that if I define static data that maps onto a 'struct' I can get errors in the generated output... But only, if I do so in a dll, and in release mode.
Sign in to post a comment.
Posted by Microsoft on 8/16/2010 at 5:51 PM
Hi. Thanks for reporting this bug!

We can reproduce the issue and are working on a fix.

Meanwhile, you can workaround this issue by using pragma optimize directive to selectively disable the optimizer.

MSDN documentation is here

and you will add pragma around the definition of your struct like this:

#pragma optimize("",off)

static NativeVectorLayout gLayoutVector2 = { ... };

#pragma optimize("",on)

Thanks again for your report
Seunghun Thomas Lee
Posted by Microsoft on 8/2/2010 at 1:01 AM
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 Microsoft on 7/31/2010 at 5:09 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(