Search

C1001 Error - "virtual" inheritance, member function pointer template and "Enable minimal rebuild" by gatorette

Closed
as Fixed Help for as Fixed

1
0
Sign in
to vote
Type: Bug
ID: 665425
Opened: 4/28/2011 4:24:14 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
A "fatal error C1001: An internal error has occurred in the compiler." error occurs when compiling (a priori) correct C++ code. The code is attached to this report.

Notes:
1. The code compiles correctly if "Derived" does not inherit virtually from "Base"
2. The code compiles correctly if "Contained" is not templated by member function (void(T::*)()).
3. The code compiles correctly if "Enable minimal rebuild" is disabled (/Gm-).

The same error was reproduced with Visual Studio 2005 SP2 (Version 8.0.50727.762 (SP.050727-7600)).

The same code was tested and compiled correctly on several online compilers (Comeau, g++ 4.1.2 through codepad.org).
Details (expand)

Visual Studio/Silverlight/Tooling version

Visual Studio 2010

What category (if any) best represents this feedback?

 

Steps to reproduce

Compile C++ code provided as attachment with the following command-line:
cl /Gm /ZI main.cpp

Product Language

English

Operating System

Windows XP

Operating System Language

English (US)

Actual results

1>c:\dev\c1001\main.cpp(5): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'msc1.cpp', line 1420)
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

Expected results

Successful compile.
File Attachments
File Name Submitted By Submitted On File Size  
main.cpp 4/28/2011 389 bytes
Sign in to post a comment.
Posted by Microsoft on 9/22/2011 at 10:37 PM
Hi: this issue has been fixed. The fix should show up in a future release of Visual C++.

Thank you for reporting the issue.

Jonathan Caves
Visual C++ Compiler Team
Posted by Microsoft on 4/28/2011 at 5:13 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.