*******************************************************************************
*** GNU17 BUG REPORT **********************************************************
*******************************************************************************
Registration No.    :C17_002_compiler
Issue and revision  :2008/5/19

--- <Tool name / Object version> ----------------------------------------------
GNU17V1.2.0 or earlier

--- <Content> -----------------------------------------------------------------
It cannot be accessed rightly to the array when operation using immediate is
performed at the index expression of the global array.

--- <Generation condition> ----------------------------------------------------
When all the following conditions are filled.

* Compiled with SMALL model(-mpointer16).
* The index expression of the array has a operation using immediate and 
  variables.
* The array is global.
* The type of the array is the following.
  unsigned char / unsigned short / unsigned int / unsigned long / char / short 
  int / long / float / enum / structure / union
  
sample code:
  unsigned int INPUT[20];
  float f_Val;

  int main(void)
  {
      int i, y;

      for(i = 0; i <2; i++) {                  
          f_Val = INPUT[y + 16 - i];  // It cannot be accessed rightly
      };                              // to the array( INPUT[] ).

--- <Temporary Measures> ------------------------------------------------------
Do not operate using immediate at the index expression of the array 
with SMALL model(-mpointer16).
If you need to operate, assign the operation result to the global work variable,
and use it as the index expression of the array.

sample code:
  unsigned int INPUT[20];
  float f_Val;
  int i_Wk;                           // a global work variable
  
  void main(void)
  {
      int i, y;

      for(i = 0; i <2; i++) {                    
          i_Wk = y + 16 - i;          // Assign the operation result to the 
                                      // global work variable.
          f_Val = INPUT[i_Wk];        // It can be accessed rightly to the array
      };                              // by using the global variable.

--- <About the correction version> --------------------------------------------
Patch: None
Product version: GNU17V1.2.1

