[Prev][Next][Index]

Re: Fortran M support



> 
> 
> libSage++ does not completely support the Fortran M _PROCESS_ statement; in
> the code for SgSymbol::body() (around line 2240 in libSage++) there is the
> following code:
> 
> >        if ((SYMB_CODE(thesymb) == FUNCTION_NAME) ||
> >            (SYMB_CODE(thesymb) == PROGRAM_NAME) ||
> >            (SYMB_CODE(thesymb) == PROCEDURE_NAME) ||
> >            (SYMB_CODE(thesymb) == MEMBER_FUNC))
> >          {
> >	 	bif = SYMB_FUNC_HEDR(thesymb); // needed, otherwise breaks pC++
> >		if (!bif)
> >        	 bif = getFunctionHeader(thesymb);
> >          } else
> >            {
> >              Message("Body not found, may not be implemented yet",0);
> >              SORRY;
> >            }	
> >      }
> 
> I need this code to support PROCESS_NAME symbols in addition to the
> others. I am not particularly familiar with the internal representation yet,
> but since a PROCESS is essentially a SUBROUTINE, am I correct in assuming
> that if I add another case (for PROCESS_NAME) to the above IF nest, it will
> have the desired effect?
> 
> --lars

You are right. It is a correct fix.

Chih-Yi
PS. I'll get back to you with the problem about Fortran function name soon.




Reference(s):