Beispiel #1
0
static void
show_ref (gfc_ref *p)
{
  for (; p; p = p->next)
    switch (p->type)
      {
      case REF_ARRAY:
	show_array_ref (&p->u.ar);
	break;

      case REF_COMPONENT:
	fprintf (dumpfile, " %% %s", p->u.c.component->name);
	break;

      case REF_SUBSTRING:
	fputc ('(', dumpfile);
	show_expr (p->u.ss.start);
	fputc (':', dumpfile);
	show_expr (p->u.ss.end);
	fputc (')', dumpfile);
	break;

      default:
	gfc_internal_error ("show_ref(): Bad component code");
      }
}
Beispiel #2
0
static void show_ref(g95_ref *p) {
int i;

    switch(p->type) {
    case REF_ARRAY:
	show_array_ref(&p->u.ar);
	break;

    case REF_COMPONENT:
	g95_status("comp('%s')", p->u.c.component->name);
	break;

    case REF_SUBSTRING:
	g95_status("substr(start=");
	g95_show_expr(p->u.ss.start);

	g95_status(", end=");
	g95_show_expr(p->u.ss.end);

	g95_status_char(')');
	break;

    case REF_COARRAY:
	g95_status("coarray(");

	for(i=0; i<p->u.car.dimen; i++) {
	    g95_show_expr(p->u.car.element[i]);

	    if (i != p->u.car.dimen - 1)
		g95_status_char(',');
	}

	g95_status_char(')');
	break;

    default:
	g95_internal_error("show_ref(): Bad component code");
    }
}