Initializer list in a lambda crashes - by Aaron J Ballman

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.

Sign in
to vote
ID 743303 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 5/23/2012 9:39:59 AM
Access Restriction Public


The following reduced testcase produces an ICE with the compiler.  If you modify the code slightly, it produces an incorrect compile error.
Sign in to post a comment.
Posted by Microsoft on 5/24/2012 at 10:25 AM
    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 MS-Moderator10 [Feedback Moderator] on 5/23/2012 at 11:25 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 Aaron J Ballman on 5/23/2012 at 10:21 AM
Also note that moving the structure declaration to the top level changes the behavior.

1) Local to function == causes crash/error
2) At translation unit level, with static const declaration == causes internal error with the compiler

fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\p2symtab.c', line 5858)
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

3) At translation unit level, without static const declaration == compiles cleanly
Posted by MS-Moderator01 on 5/23/2012 at 9:42 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(
Posted by Aaron J Ballman on 5/23/2012 at 9:41 AM
Note that removing the static const has no effect on the outcome.