ID: Q115853
1.50 WINDOWS kbtool kbbuglist
The information in this article applies to:
- Microsoft Visual C++ for Windows, version 1.5
Compiling the sample code shown below with the /G3 option causes the compiler to generate the following error message:
fatal error C1001: internal compiler error
(compiler file 'msc3.cpp', line 429)
To avoid the C1001 error, do one of the following:
1. Do not compile with the /G3 option.
-or-
2. Restructure the code to avoid the problem. The sample code below
illustrates this technique.
-or-
3. Try disabling all optimizations around the area that causes
the error
Microsoft has confirmed this to be a bug in the Microsoft products listed above. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.
This is not a problem in the 32-bit compilers.
The following sample code can be used to demonstrate the problem.
/* Compile options needed: /G3
*/
#include <stdlib.h>
#define TRUE 1
#define FALSE 0
long double var_1 = 1.0;
long double var_2 = 2.0;
void main()
{
long double var_1_is_less;
long double tmp;
// This statement causes the C1001 error
var_1_is_less = (__min( var_1 , var_2 ) == var_1);
// Restructuring the code to something like the following
// avoids the problem
/*
if(__min( var_1 , var_2 ) == var_1)
var_1_is_less = TRUE;
else
var_1_is_less = FALSE;
*/
}
Additional reference words: 1.50 8.00c KBCategory: kbtool kbbuglist KBSubcategory: CLIss Keywords : kb16bitonly
Last Reviewed: July 23, 1997