]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
dump-parse-tree.c (show_code_node): Print association list of a block if present.
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Feb 2016 22:24:27 +0000 (22:24 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sun, 28 Feb 2016 22:24:27 +0000 (22:24 +0000)
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.

From-SVN: r233796

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

index 56f2bdde04a7fd0a1e0e23cec5fc0ddcaa3b9c88..9d2c94bc2bf1bf08d6871dbbc3c5ba6a0ff6fcf2 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 c96133f0e8141c6edfe824cb1ab3aaea2029d202..8d50d75fcf657c8af1e531f7b11a88f71728baef 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);