gfc_conv_expr_val

Feng Wang wf_cs@yahoo.com
Wed Aug 3 12:53:00 GMT 2005


When tracing a bug, I found some weird codes in gfc_conv_expr_val. This is a
simple function in trans-expr.c as follows:

void
gfc_conv_expr_val (gfc_se * se, gfc_expr * expr)
{
  tree val;

  gcc_assert (expr->ts.type != BT_CHARACTER);
  gfc_conv_expr (se, expr);
  if (se->post.head)
    {
      val = gfc_create_var (TREE_TYPE (se->expr), NULL);
      gfc_add_modify_expr (&se->pre, val, se->expr);
    }
}

In the if block, we create a tempary variable and assign an expression to it.
But obviously we cannot use the variable when leaving the function. I don't
know the aim of the function since there is no comment on it. If I remove the
if block, regtest is also successful on ia64-linux-gnu.


Best Regards,
Feng Wang

--
Creative Compiler Research Group,
National University of Defense Technology, China.


		
__________________________________ 
Meet your soulmate!
Yahoo! Asia presents Meetic - where millions of singles gather
http://asia.yahoo.com/meetic



More information about the Fortran mailing list