OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

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

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

Rev 285 Rev 378
Line 2311... Line 2311...
{
{
  match m;
  match m;
  locus old_locus;
  locus old_locus;
 
 
  gfc_clear_ts (ts);
  gfc_clear_ts (ts);
 
  gfc_gobble_whitespace();
 
  old_locus = gfc_current_locus;
 
 
 
  m = match_derived_type_spec (ts);
 
  if (m == MATCH_YES)
 
    {
  old_locus = gfc_current_locus;
  old_locus = gfc_current_locus;
 
      if (gfc_match (" :: ") != MATCH_YES)
 
        return MATCH_ERROR;
 
      gfc_current_locus = old_locus;
 
      /* Enfore F03:C401.  */
 
      if (ts->u.derived->attr.abstract)
 
        {
 
          gfc_error ("Derived type '%s' at %L may not be ABSTRACT",
 
                     ts->u.derived->name, &old_locus);
 
          return MATCH_ERROR;
 
        }
 
      return MATCH_YES;
 
    }
 
  else if (m == MATCH_ERROR && gfc_match (" :: ") == MATCH_YES)
 
    return MATCH_ERROR;
 
 
 
  gfc_current_locus = old_locus;
 
 
  if (gfc_match ("integer") == MATCH_YES)
  if (gfc_match ("integer") == MATCH_YES)
    {
    {
      ts->type = BT_INTEGER;
      ts->type = BT_INTEGER;
      ts->kind = gfc_default_integer_kind;
      ts->kind = gfc_default_integer_kind;
Line 2354... Line 2376...
      ts->type = BT_LOGICAL;
      ts->type = BT_LOGICAL;
      ts->kind = gfc_default_logical_kind;
      ts->kind = gfc_default_logical_kind;
      goto kind_selector;
      goto kind_selector;
    }
    }
 
 
  m = match_derived_type_spec (ts);
 
  if (m == MATCH_YES)
 
    {
 
      old_locus = gfc_current_locus;
 
      if (gfc_match (" :: ") != MATCH_YES)
 
        return MATCH_ERROR;
 
      gfc_current_locus = old_locus;
 
      /* Enfore F03:C401.  */
 
      if (ts->u.derived->attr.abstract)
 
        {
 
          gfc_error ("Derived type '%s' at %L may not be ABSTRACT",
 
                     ts->u.derived->name, &old_locus);
 
          return MATCH_ERROR;
 
        }
 
      return MATCH_YES;
 
    }
 
  else if (m == MATCH_ERROR && gfc_match (" :: ") == MATCH_YES)
 
    return MATCH_ERROR;
 
 
 
  /* If a type is not matched, simply return MATCH_NO.  */
  /* If a type is not matched, simply return MATCH_NO.  */
  gfc_current_locus = old_locus;
  gfc_current_locus = old_locus;
  return MATCH_NO;
  return MATCH_NO;
 
 
kind_selector:
kind_selector:
Line 3578... Line 3581...
 
 
/* Free equivalence sets and lists.  Recursively is the easiest way to
/* Free equivalence sets and lists.  Recursively is the easiest way to
   do this.  */
   do this.  */
 
 
void
void
gfc_free_equiv (gfc_equiv *eq)
gfc_free_equiv_until (gfc_equiv *eq, gfc_equiv *stop)
{
{
  if (eq == NULL)
  if (eq == stop)
    return;
    return;
 
 
  gfc_free_equiv (eq->eq);
  gfc_free_equiv (eq->eq);
  gfc_free_equiv (eq->next);
  gfc_free_equiv_until (eq->next, stop);
  gfc_free_expr (eq->expr);
  gfc_free_expr (eq->expr);
  gfc_free (eq);
  gfc_free (eq);
}
}
 
 
 
 
 
void
 
gfc_free_equiv (gfc_equiv *eq)
 
{
 
  gfc_free_equiv_until (eq, NULL);
 
}
 
 
 
 
/* Match an EQUIVALENCE statement.  */
/* Match an EQUIVALENCE statement.  */
 
 
match
match
gfc_match_equivalence (void)
gfc_match_equivalence (void)
{
{

powered by: WebSVN 2.1.0

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