pro64-support
[Top] [All Lists]

Latent bug in cg?

To: pro64-support@xxxxxxxxxxx
Subject: Latent bug in cg?
From: Antony Bowers <Antony.Bowers@xxxxxx>
Date: Thu, 21 Jun 2001 16:25:48 +0100 (BST)
Sender: owner-pro64-support@xxxxxxxxxxx
I've been exploring the source of the Pro64 code generator. File 
be/cg/whirl2ops.cxx has the following code:

Convert_WHIRL_To_OPs(WN * tree)
{
  ...
  CGRIN *cgrin;
  ...

  switch ( WN_opcode( tree ) ) {
    ...
    case OPC_REGION:
    Compiling_Proper_REGION = TRUE;
    if ( RID_level( rid ) < RL_CG ) {      /* it is WHIRL */
       ...
    }
    else { /* it is OPs */
      ...
      CGRIN_entry( cgrin ) = REGION_First_BB;
      stmt = NULL;
    }
    break;

    ...
  }

  ...
} 

It looks as though the variable cgrin is being used uninitialised in the
line
 
     CGRIN_entry( cgrin ) = REGION_First_BB;

and if so, there are more uninitialised uses further down. Presumably
this case of revisiting a region already translated to OPS never arises in
practice.

Just thought I'd report this to the list in case the information is of
value.

   Tony

-- 
Antony Bowers, STMicroelectronics, Bristol, UK


<Prev in Thread] Current Thread [Next in Thread>