Search

VC 11 optimizing compiler crash by 叛逆者.C__

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 727873
Opened: 3/1/2012 10:49:02 PM
Access Restriction: Public
Moderator Decision: Sent to Engineering Team for consideration
0
Workaround(s)
0
User(s) can reproduce this bug
VC 11 beta optimizing compiler crash when compiling a template function with default value. The error is "fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1438)".
VC 10 success to compile it.
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling version

Visual Studio 11 Beta

Steps to reproduce

Use VC11 to compile this code:

template <typename T>
class Type_T
{
public:
    Type_T(T const & x)
    {
    }
};

template <typename T>
Type_T<T> func(Type_T<T> const & a, Type_T<T> const & b = Type_T<T>(0));

void F1()
{
    Type_T<int> ret = func(Type_T<int>(0));
}

void F2()
{
    Type_T<int> ret = func(Type_T<int>(0));
}

Product Language

English

Operating System

Windows 7

Operating System Language

English

Actual results

Crash at line 11

Expected results

Compile successfully.
File Attachments
File Name Submitted By Submitted On File Size  
testTemp.cpp 3/1/2012 296 bytes
Sign in to post a comment.
Posted by Microsoft on 3/2/2012 at 2:35 PM
Hello,

Thank you for this bug report. We have fixed it for Dev11 RC. I apologize for not having the fix included in the Beta. Final VS11 product will have the bug fixed.

Thanks,
Ulzii Luvsanbat
Visual C++ Team
Posted by MS-Moderator09 [Feedback Moderator] on 3/2/2012 at 12:56 AM
Thank you for submitting feedback on Visual Studio 2010 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 MS-Moderator01 on 3/1/2012 at 11:37 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)
Sign in to post a workaround.