XMMATRIX not properly aligned when using c++11 auto keyword. - by MerickLDS

Status : 


Sign in
to vote
ID 761026 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 9/3/2012 6:42:29 PM
Access Restriction Public


When compiling C++ code which uses the DirectXMath library structures like XMMATRIX, if local variables are declared using the "auto" keyword from functions which return such structures, the resulting assembly does not ensure these stack variables are properly aligned to a 16 byte boundary.

Simply removing the "auto" keyword and replacing it with "XMMATRIX" results in correct assembly which runs without errors.
Sign in to post a comment.
Posted by Microsoft on 4/29/2014 at 12:32 PM
Thank you for reporting this issue. This issue has been fixed in Visual Studio 2013. You can install a trial version of Visual Studio 2013 with the fix from: http://go.microsoft.com/?linkid=9832436
Posted by Microsoft on 11/15/2012 at 9:50 AM
    Thanks for reporting the issue.
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.

Xiang Fan
Visual C++ Team
Posted by Microsoft on 9/4/2012 at 2:21 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Microsoft Visual Studio Connect Support Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 9/3/2012 at 6:51 PM
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)