ARM Technical Support Knowledge Articles

FATAL ERROR (CANNOT OPTIMIZE FUNCTION)

Applies to: C51 C Compiler

Answer


Information in this article applies to:


QUESTION

When I compile the following code:

typedef struct
  {
    char VarMember4 ;
    char VarMember5 ;
    char VarMember6 ;
    char VarMember7 ;
    char VarMember11 ;
  } StructType ;

void FUNC_A (char, char, char, char) ;
void FUNC_B (StructType*, char) ;

void FUNC_B (StructType* VarParamF, char VarParamG)
{
  FUNC_A (VarParamF->VarMember4, VarParamF->VarMember5,
          VarParamG, VarParamF->VarMember11) ;
}

I receive this error:

C51 FATAL-ERROR -
  ACTION:  GLOBAL OPTIMIZATION
  ERROR:  CANNOT OPTIMIZE FUNCTION
C51 TERMINATED.

What's going on? Is there a fix for this problem?

ANSWER

Yes. This is a known problem in C51 V6.10a. It has been corrected in V6.10c.

ATTACHED FILES

Request the files attached to this knowledgebase article.

Article last edited on: 2005-05-19 18:44:02

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential