/* Build executable statement trees.
- Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Andy Vaught
its tail, returning a pointer to the new tail. */
gfc_code *
-gfc_append_code (gfc_code *tail, gfc_code *new)
+gfc_append_code (gfc_code *tail, gfc_code *new_code)
{
if (tail != NULL)
{
while (tail->next != NULL)
tail = tail->next;
- tail->next = new;
+ tail->next = new_code;
}
- while (new->next != NULL)
- new = new->next;
+ while (new_code->next != NULL)
+ new_code = new_code->next;
- return new;
+ return new_code;
}
void
gfc_free_statement (gfc_code *p)
{
- if (p->expr)
- gfc_free_expr (p->expr);
+ if (p->expr1)
+ gfc_free_expr (p->expr1);
if (p->expr2)
gfc_free_expr (p->expr2);
switch (p->op)
{
case EXEC_NOP:
+ case EXEC_END_BLOCK:
case EXEC_ASSIGN:
case EXEC_INIT_ASSIGN:
case EXEC_GOTO:
case EXEC_CYCLE:
case EXEC_RETURN:
+ case EXEC_END_PROCEDURE:
case EXEC_IF:
case EXEC_PAUSE:
case EXEC_STOP:
+ case EXEC_ERROR_STOP:
case EXEC_EXIT:
case EXEC_WHERE:
case EXEC_IOLENGTH:
case EXEC_LABEL_ASSIGN:
case EXEC_ENTRY:
case EXEC_ARITHMETIC_IF:
+ case EXEC_CRITICAL:
+ case EXEC_SYNC_ALL:
+ case EXEC_SYNC_IMAGES:
+ case EXEC_SYNC_MEMORY:
break;
+ case EXEC_BLOCK:
+ gfc_free_namespace (p->ext.ns);
+ break;
+
+ case EXEC_COMPCALL:
+ case EXEC_CALL_PPC:
case EXEC_CALL:
case EXEC_ASSIGN_CALL:
gfc_free_actual_arglist (p->ext.actual);
break;
case EXEC_SELECT:
+ case EXEC_SELECT_TYPE:
if (p->ext.case_list)
gfc_free_case_list (p->ext.case_list);
break;
case EXEC_ALLOCATE:
case EXEC_DEALLOCATE:
- gfc_free_alloc_list (p->ext.alloc_list);
+ gfc_free_alloc_list (p->ext.alloc.list);
break;
case EXEC_OPEN: