OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [fortran/] [trans.c] - Diff between revs 285 and 378

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 285 Rev 378
Line 1039... Line 1039...
{
{
  gfc_current_backend_file = loc->lb->file;
  gfc_current_backend_file = loc->lb->file;
  input_location = loc->lb->location;
  input_location = loc->lb->location;
}
}
 
 
 
/* Annotate statement or statement list T with location LOC.  */
 
 
 
static void
 
gfc_annotate_with_location (tree t, location_t loc)
 
{
 
  if (TREE_CODE (t) == STATEMENT_LIST)
 
    {
 
      tree_stmt_iterator i;
 
 
 
      for (i = tsi_start (t); !tsi_end_p (i); tsi_next (&i))
 
        gfc_annotate_with_location (tsi_stmt (i), loc);
 
      return;
 
    }
 
  if (TREE_CODE (t) == COMPOUND_EXPR)
 
    {
 
      gfc_annotate_with_location (TREE_OPERAND (t, 0), loc);
 
      gfc_annotate_with_location (TREE_OPERAND (t, 1), loc);
 
    }
 
  if (TREE_CODE (t) == LABEL_EXPR || !TREE_SIDE_EFFECTS (t))
 
    return;
 
  if (CAN_HAVE_LOCATION_P (t) && ! EXPR_HAS_LOCATION (t))
 
    SET_EXPR_LOCATION (t, loc);
 
}
 
 
/* Translate an executable statement. The tree cond is used by gfc_trans_do.
/* Translate an executable statement. The tree cond is used by gfc_trans_do.
   This static function is wrapped by gfc_trans_code_cond and
   This static function is wrapped by gfc_trans_code_cond and
   gfc_trans_code.  */
   gfc_trans_code.  */
 
 
Line 1065... Line 1088...
        {
        {
          res = gfc_trans_label_here (code);
          res = gfc_trans_label_here (code);
          gfc_add_expr_to_block (&block, res);
          gfc_add_expr_to_block (&block, res);
        }
        }
 
 
 
      gfc_set_backend_locus (&code->loc);
 
 
      switch (code->op)
      switch (code->op)
        {
        {
        case EXEC_NOP:
        case EXEC_NOP:
        case EXEC_END_BLOCK:
        case EXEC_END_BLOCK:
        case EXEC_END_PROCEDURE:
        case EXEC_END_PROCEDURE:
Line 1279... Line 1304...
 
 
      gfc_set_backend_locus (&code->loc);
      gfc_set_backend_locus (&code->loc);
 
 
      if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
      if (res != NULL_TREE && ! IS_EMPTY_STMT (res))
        {
        {
          if (TREE_CODE (res) != STATEMENT_LIST)
          gfc_annotate_with_location (res, input_location);
            SET_EXPR_LOCATION (res, input_location);
 
 
 
          /* Add the new statement to the block.  */
          /* Add the new statement to the block.  */
          gfc_add_expr_to_block (&block, res);
          gfc_add_expr_to_block (&block, res);
        }
        }
    }
    }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.