Bug in SgExpression::IsSymbolInExpression()?


	I've been trying to use SgExpression::IsSymbolInExpression() with 
no success. Maybe I'm doing something wrong, but I don't know what it

	This is the problem. I am analyzing function call parameters
to determine which parameter contains the symbol _ENT_INOUT, which is
an integer variable. To do that, I loop over all the arguments of the
function call 'fn' looking for the symbol.

   SgSymbol   inout("_ENT_INOUT", SgType(T_INT));

   for (i = 0; i < fn->numberOfArgs(); i++) {

      if (fn->arg(i)->IsSymbolInExpression(inout))
         Special symbol found


However, the if() check is never true even for arguments which do
contain the symbol. Here's a gdb session that shows the problem:

Breakpoint 1, EntAsset::removeEntParameters (this=0x2fd328, st=@0x2fd328, 
    fn=0x2f9f58) at ../EntAsset.C:609
609                      if (fn->arg(i)->IsSymbolInExpression(inout);

(gdb) print fn->arg(i)->symbRefs()->unparsestdout()
pivot, _ENT_INOUT

(gdb) print ((SgExprListExp *)(fn->arg(i)->symbRefs()))->elem(1)->unparsestdout()

(gdb) print ((SgExprListExp *)(fn->arg(i)->symbRefs()))->elem(1)->symbol()->identifier
$7 = 0x2b6728 "_ENT_INOUT"

(gdb) print ((SgExprListExp *)(fn->arg(i)->symbRefs()))->elem(1)->symbol()->variant()
$8 = 503

(gdb) print inout.variant()
$9 = 503

(gdb) print inout
$10 = {<SgSymbol> = {thesymb = 0x2fd6d0}, }

(gdb) print fn->arg(i)->IsSymbolInExpression(inout)
$11 = (SgExpression *) 0x0

(gdb) print fn->arg(i)->symbRefs()->IsSymbolInExpression(inout)
$12 = (SgExpression *) 0x0

Am I missing something. Thanks a lot. Diego.

Diego Novillo (diego@cs.ualberta.ca)  | Computing Science - U of Alberta
WWW: http://web.cs.ualberta.ca/~diego |       Edmonton, Alberta - Canada

   "We each pay a fabulous price for our visions of paradise. But a
    spirit with a vision is a dream with a mission" Rush - Mission