Home Dashboard Directory Help
Search

Crash when compiling [related to float/double conversions?] by Brian R Jacobson


Status: 

Closed
 as Fixed Help for as Fixed


1
0
Sign in
to vote
Type: Bug
ID: 634020
Opened: 12/30/2010 2:53:46 PM
Access Restriction: Public
0
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Compile this code

#pragma warning( disable: 4244 )
#pragma warning( disable: 4100 )

inline float Test( float l )
{
    return ( l + 0.5 );
}

int main( int argc, char **argv )
{
    float x = 1.0f;
    x = x * Test( x ) + x * Test( x );
    return x;
}

with these command-line options

/Zi /nologo /W4 /WX /O2 /Ob2 /Oi /Ot /Oy- /D "WIN32" /D "_WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_CRT_SECURE_NO_DEPRECATE" /D "_CRT_NONSTDC_NO_DEPRECATE" /D "COMPILER_MSVC32" /D "COMPILER_MSVC" /D "MEMOVERRIDE_MODULE=resourceinfo" /D "_DLL_EXT=.dll" /D "EXENAME=resourceinfo" /D "VPCGAME=valve" /D "VPCGAMECAPS=VALVE" /D "PROJECTDIR=d:\main" /GF /Gm- /MT /GS- /Gy /arch:SSE2 /fp:fast /Zc:wchar_t /Zc:forScope /GR /openmp- /Fp"Release_Python2.5\resourceinfo.pch" /Fa"Release_Python2.5\/" /Fo"Release_Python2.5\/" /Fd"Release_Python2.5\/" /Gd /TP /analyze- /errorReport:prompt

You will get this crash message:

d:\main\src\utils\resourceinfo\resourceinfo.cpp(25): fatal error C1001: An internal error has occurred in the compiler.
1> (compiler file 'f:\dd\vctools\compiler\utc\src\p2\main.c[0x506E1896:0x00000004]', line 183)
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
Sign in to post a comment.
Posted by Microsoft on 5/12/2011 at 10:00 AM
Hi, thanks for the bug report. This will be fixed in a future release.

Eric
VC++ Team
Posted by Brian R Jacobson on 12/31/2010 at 9:05 AM
Yes, that's how I worked around it for now, so it's not a showstopper for me.
Posted by Mike Danes on 12/30/2010 at 11:23 PM
Seems to work fine if you use 0.5f instead of 0.5 in the Test function.
Posted by Microsoft on 12/30/2010 at 7:02 PM
Thanks for your feedback. We are routing 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 12/30/2010 at 3:22 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.