2016-02-28 Thomas Koenig <tkoenig@gcc.gnu.org>
authortkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 28 Feb 2016 22:24:27 +0000 (22:24 +0000)
committertkoenig <tkoenig@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 28 Feb 2016 22:24:27 +0000 (22:24 +0000)
* dump-parse-tree.c (show_code_node):  Print association
list of a block if present.  Handle EXEC_END_BLOCK.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@233796 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/dump-parse-tree.c

index 56f2bdd..9d2c94b 100644 (file)
@@ -1,3 +1,8 @@
+2016-02-28  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       * dump-parse-tree.c (show_code_node):  Print association
+       list of a block if present.  Handle EXEC_END_BLOCK.
+
 2016-02-28  Harald Anlauf <anlauf@gmx.de>
            Jerry DeLisle  <jvdelisle@gcc.gnu.org>
 
index c96133f..8d50d75 100644 (file)
@@ -1773,6 +1773,7 @@ show_code_node (int level, gfc_code *c)
       {
        const char* blocktype;
        gfc_namespace *saved_ns;
+       gfc_association_list *alist;
 
        if (c->ext.block.assoc)
          blocktype = "ASSOCIATE";
@@ -1780,6 +1781,12 @@ show_code_node (int level, gfc_code *c)
          blocktype = "BLOCK";
        show_indent ();
        fprintf (dumpfile, "%s ", blocktype);
+       for (alist = c->ext.block.assoc; alist; alist = alist->next)
+         {
+           fprintf (dumpfile, " %s = ", alist->name);
+           show_expr (alist->target);
+         }
+
        ++show_level;
        ns = c->ext.block.ns;
        saved_ns = gfc_current_ns;
@@ -1793,6 +1800,11 @@ show_code_node (int level, gfc_code *c)
        break;
       }
 
+    case EXEC_END_BLOCK:
+      /* Only come here when there is a label on an
+        END ASSOCIATE construct.  */
+      break;
+
     case EXEC_SELECT:
       d = c->block;
       fputs ("SELECT CASE ", dumpfile);