Visual Studio 2012 RC compiler crashes with /Ox & /fp:fast options - by Mārtiņš Možeiko

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.


1
0
Sign in
to vote
ID 749567 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 6/17/2012 12:58:44 AM
Access Restriction Public

Description

Code below crashes cl.exe compiler:

#include <math.h>

void foo()
{
    float data[2 * 30];
    float angle = 0.0f;

    for (int i = 0; i < 30; i++)
    {
        float y = float (cos(angle));
        data[i] = y;
        data[i + 30] = y;
        angle += 42.0f;
    }
}
Sign in to post a comment.
Posted by Microsoft on 6/26/2012 at 1:12 PM
Hey, I just wanted to let you know we have fixed this bug for the VS11 release.

Eric
Posted by Microsoft on 6/22/2012 at 7:11 PM
Hi, thanks for the bug report. We are working on a fix for the release of VS11 RTM.

If you need a workaround, please use #pragma optimize("", off) <the affected function> #pragma optimize("", on).

The crash is in the C++ compiler optimizer, and happens when we try to distribute one loop into multiple loops to split a data dependence.

Thanks,
Eric - Microsoft Visual C++
Posted by Microsoft on 6/17/2012 at 11:07 PM
Thank you for submitting feedback on Visual Studio 11 and .NET Framework. Your issue has been routed to the appropriate VS development team for review. We will contact you if we require any additional information.

Posted by Microsoft on 6/17/2012 at 1:55 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)