OSDN Git Service

2009-05-13 Tobias Burnus <burnus@net-b.de>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 May 2009 14:52:54 +0000 (14:52 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 May 2009 14:52:54 +0000 (14:52 +0000)
        PR fortran/34153
        * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
        * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
        * trans.c (gfc_trans_code): Ditto.
        * resolve.c (resolve_code): Ditto.
        * st.c (gfc_free_statement): Ditto.

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

gcc/fortran/ChangeLog
gcc/fortran/dump-parse-tree.c
gcc/fortran/gfortran.h
gcc/fortran/parse.c
gcc/fortran/resolve.c
gcc/fortran/st.c
gcc/fortran/trans.c

index 2994acf..1ca8b68 100644 (file)
@@ -1,3 +1,13 @@
+2009-05-13  Tobias Burnus  <burnus@net-b.de>
+
+       PR fortran/34153
+       * gfortran.h (gfc_exec_op): Add EXEC_END_PROCEDURE.
+       * dump-parse-tree.c (show_code_node): Use EXEC_END_PROCEDURE.
+       * trans.c (gfc_trans_code): Ditto.
+       * resolve.c (resolve_code): Ditto.
+       * st.c (gfc_free_statement): Ditto.
+       * parse.c (accept_statement): Ditto.
+
 2009-05-12  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/40110
index e007a54..51d76f0 100644 (file)
@@ -1148,6 +1148,9 @@ show_code_node (int level, gfc_code *c)
 
   switch (c->op)
     {
+    case EXEC_END_PROCEDURE:
+      break;
+
     case EXEC_NOP:
       fputs ("NOP", dumpfile);
       break;
index fad49c4..73b2178 100644 (file)
@@ -1893,7 +1893,7 @@ typedef enum
   EXEC_ENTRY, EXEC_PAUSE, EXEC_STOP, EXEC_CONTINUE, EXEC_INIT_ASSIGN,
   EXEC_IF, EXEC_ARITHMETIC_IF, EXEC_DO, EXEC_DO_WHILE, EXEC_SELECT,
   EXEC_FORALL, EXEC_WHERE, EXEC_CYCLE, EXEC_EXIT, EXEC_CALL_PPC,
-  EXEC_ALLOCATE, EXEC_DEALLOCATE,
+  EXEC_ALLOCATE, EXEC_DEALLOCATE, EXEC_END_PROCEDURE,
   EXEC_OPEN, EXEC_CLOSE, EXEC_WAIT,
   EXEC_READ, EXEC_WRITE, EXEC_IOLENGTH, EXEC_TRANSFER, EXEC_DT_END,
   EXEC_BACKSPACE, EXEC_ENDFILE, EXEC_INQUIRE, EXEC_REWIND, EXEC_FLUSH,
index d387f54..3c54c46 100644 (file)
@@ -1496,6 +1496,11 @@ accept_statement (gfc_statement st)
          new_st.op = EXEC_RETURN;
          add_statement ();
        }
+      else
+       {
+         new_st.op = EXEC_END_PROCEDURE;
+         add_statement ();
+       }
 
       break;
 
index b7550f5..43044ef 100644 (file)
@@ -6938,6 +6938,7 @@ resolve_code (gfc_code *code, gfc_namespace *ns)
          break;
 
        case EXEC_INIT_ASSIGN:
+       case EXEC_END_PROCEDURE:
          break;
 
        case EXEC_ASSIGN:
index d0cdb0e..866f9bf 100644 (file)
@@ -94,6 +94,7 @@ gfc_free_statement (gfc_code *p)
     case EXEC_GOTO:
     case EXEC_CYCLE:
     case EXEC_RETURN:
+    case EXEC_END_PROCEDURE:
     case EXEC_IF:
     case EXEC_PAUSE:
     case EXEC_STOP:
index 28cb60a..c842ea8 100644 (file)
@@ -1056,6 +1056,7 @@ gfc_trans_code (gfc_code * code)
        {
        case EXEC_NOP:
        case EXEC_END_BLOCK:
+       case EXEC_END_PROCEDURE:
          res = NULL_TREE;
          break;