Search

fatal error C1001: An internal error has occurred in the compiler. by Jinhao.CPP

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 760771
Opened: 9/1/2012 12:20:35 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
Compiler generates an internal error when compiling following code
----------------------------
#include <vector>

struct T
{
    std::vector<int> v;
};

std::vector<T>::iterator vec(std::vector<T>& v)
{
    return v.begin();
}

int main()
{
    std::vector<T> v;
    v.push_back(T());

    for(auto i: vec(v)->v) //here
    {
    
    }
}
---------------------------
main.cpp(22): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\ehexcept.c', line 965)
1> To work around this problem, try simplifying or changing the program near the locations listed above.
1> Please choose the Technical Support command on the Visual C++
1> Help menu, or open the Technical Support help file for more information
Details (expand)

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

Visual Studio 2012

Steps to reproduce

compile the above code

Product Language

English

Operating System

Windows 7

Operating System Language

Chinese (Simplified)

Actual results

fatal error C1001: An internal error has occurred in the compiler.

Expected results

Build: 1 succeeded
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 9/5/2012 at 4:10 PM
Hi Jinhao,
    Thanks for reporting the issue.
    It is fixed in VS2012 RTM.

Xiang Fan
Visual C++ Team
Posted by Microsoft on 9/2/2012 at 7:52 PM
Thanks for your feedback.

We are rerouting 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 9/1/2012 at 12:52 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)
Sign in to post a workaround.