Optimization bug in VC++ 6.0

From: Emmanuel Stapf (manus_remove_at_remove_this_too.eiffel.com)
Date: 03/23/04


Date: Mon, 22 Mar 2004 22:23:18 -0800

Hi,

The following code fails to compile and cl (VC++ 6.0 SP5) returns an internal
error.

extern void f();

void *tab[40];
void tab_init () {
 long i;
 for (i = 8; i < 11; i++) {
  tab[i] = (void *) f;
 }
}

command line used: cl -Ox -c a.c

compiler output:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

a.c(7) : fatal error C1001: INTERNAL COMPILER ERROR
                (compiler file 'E:\8966\vc98\p2\src\P2\main.c', line 494)
    Please choose the Technical Support command on the Visual C++
    Help menu, or open the Technical Support help file for more information

Seems that it is fixed in later version of VC++, but I still need to use VC 6.0.

My question is how can I rewrite this code without disabling the optimizations
and without the internal compiler error.

Thanks in advance,
Manu



Relevant Pages

  • Re: fatal error C1001: INTERNAL COMPILER ERROR
    ... >> INTERNAL COMPILER ERROR ... or open the Technical Support help file for more information ... if there's a repro it can be added to ... > I'm Schobi at suespammers dot org ...
    (microsoft.public.dotnet.languages.vc)
  • MS EVC Compiler Error
    ... error C1001: INTERNAL COMPILER ERROR ... Please choose the Technical Support command on the Visual C++ ... or open the Technical Support help file for more information ...
    (microsoft.public.windowsce.embedded.vc)
  • RE: More Internal Compiler Errors
    ... An internal compiler error generally occurs when there is a bug in the ... Can you post some code that we can use to reproduce the problem? ... Microsoft Developer Support ... | From: "keith" ...
    (microsoft.public.dotnet.vjsharp)
  • RE: Internal Compiler Error
    ... Usually an internal compiler error is ... Microsoft Developer Support ... | From: "keith" ...
    (microsoft.public.dotnet.vjsharp)
  • INTERNAL COMPILER ERROR
    ... lines) i got internal compiler error. ... Please choose the Technical Support command on the Visual C++ ... or open the Technical Support help file for more ... I am workin on Visual Studio 2003, ...
    (microsoft.public.dotnet.languages.vc)